Skip to content
Advertisement

MySQL select count from different columns using also group by

enter image description here

I have this table called tasks. I want to fetch count of the total task of each assign_date and on that date how many complete task by complete_date per user.

I want something like below

Advertisement

Answer

Here’s your query. using union all will get the count on both assigned and complete dates

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