Forum Moderators: open
Table Log
id ¦ date
94 ¦ 2007-03-01
94 ¦ 2007-03-01
94 ¦ 2007-03-07
94 ¦ 2007-03-07
94 ¦ 2007-03-07
94 ¦ 2007-03-12
94 ¦ 2007-03-18
94 ¦ 2007-03-18
94 ¦ 2007-03-20
Table items
id ¦ Name
94 ¦ Item 1
I need to build a report that would output:
(assuming today is the 20th)
Name ¦Today ¦ This week ¦ This month
Item 1¦ 1 ¦ 3 ¦ 9
is it possible to get that information using one query? I can easily get it with 3, but if I want to show the report for more than one id those queries would multiply and the report would become slow as time passes by.
any ideas?