Using Multiple WHERE Conditions In Single SQL Query
Get the output in following format:-
[Username] [Article Contributed Last Month] [Total Articles Contributed]
Those are the columns, with the last column trying to pull the count of all articles contributed irrespective of the time. My query looks like this: -
SELECT xyz AS username, COUNT(abc) As count_last_month FROM pqr INNER JOIN ... ON .... WHERE category = 2 AND date = ...condition to select dates in the last monthThis query totally ignores the third column, where I need to fetch the total count of articles. For this, I should have to add another WHERE condition where I tweak the date = to get data for all the dates; not just the last month.
Can someone tell me how to do that?