Skip to content
Advertisement

How to count the number of a value in each month and year? SQL

how can I count the number of ‘cancel’ value in each month and year? Thank you!

MS SQL

expected output:

ETC….

Advertisement

Answer

You can start trying something like this:

The column [date] should be datetime. If it’s text you will have to cast it:

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