• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need Help with MySQL Query

 
Kishen Singh Punjabi
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have group by datewise counts in a table. But sometimes there are no counts on particular dates.
Would it be possible to have the date even when there are no counts and mark the count as zero(0) in SELECT query.

Please help.

Thanks
 
K. Tsang
Bartender
Posts: 3610
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have a look at the function COALESCE when selecting the dates.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!