KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have been trying to wrap my head around this issue but I am not making much progress. My goal is to do a left join between two tables with criteria for the right table. I would like to see the list of all products and prices for the current day even though there is no pricing row for the current day. Here is an example of the code: SELECT products.id, products.name, prices.price FROM products LEFT JOIN prices ON products.id = prices.id WHERE prices.date = CURRENT_DATE This produces only the products with price information for the current date. OK, so that is just the first part of my issue. I would eventually like to pull the price for CURRENT_DATE + INTERVAL 1 DAY as well. Any information would be greatly appreciated.
Tags (comma-separated)
Save Edits
Cancel