Skip to content
Advertisement

How to count number if special type of value by day in SQL?

I have a table in my database which looks like this:

I want to get table with number of upload value_types per day (my time column is not per day as you see). So for this example it must look like:

How should this SQL query look like? I dint understand turning time into days part especially.

Advertisement

Answer

You seem to want count() with filtering:

The above will return 0 on days that have data in the data but no uploads. You can also filter in the where clause to remove those entirely:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement