0

So I have product table and price table

is it possible to get query result like this?

Product 1/8/2023 2/8/2023 ... till end of month
A 1000 2000
B 2000 3000

can it be done with 1 query or do I need to do multiple queries and combine them later?

  • Does this answer your question? [How to write a WHERE Clause to find all records in a specific month?](https://stackoverflow.com/questions/851236/how-to-write-a-where-clause-to-find-all-records-in-a-specific-month) – OMi Shah Aug 30 '23 at 10:11
  • 1
    Please read [How to ask](https://stackoverflow.com/help/how-to-ask) and [tips-for-asking-a-good-structured-query-language-question](https://meta.stackoverflow.com/questions/271055) – Stu Aug 30 '23 at 10:12
  • also: https://stackoverflow.com/questions/32417217/filter-dates-in-sql-by-months-php-sql – OMi Shah Aug 30 '23 at 10:12
  • Have a look at some [conditional aggregation questions and answers](https://stackoverflow.com/search?q=%5Bmysql%5D+pivot+conditional+aggregation) – user1191247 Aug 30 '23 at 10:41

0 Answers0