SQL Query with Aggregate Count, where at least 1 of the counts has a value in a field SELECT PERSON_ID,COUNT(APPL_ID) COUNTS
FROM APPLICATIONS
GROUP BY PERSON_ID
ORDER BY COUNTS DESC


The above query returns all persons who have applied for all time (essentially a count of the whole table).
I want a clause to limit this to persons who have applied this year, yet still show the count of ALL their applications...
IE, a person may have applied in 2018 once, but they've applied 20 times total thus the results would be similar. Skipping over id's 1,2, 4-11.

ID | COUNT
---+------- 
003|     20
---+------- 
012|      4
I suspect you can do it using a subquery, something like:

SELECT PERSON_ID, COUNT(APPL_ID) COUNTS
FROM APPLICATIONS
WHERE PERSON_ID IN (
    SELECT DISTINCT PERSON_ID
    FROM APPLICATIONS
    WHERE APPL_DATE &gt; 2018-01-01
)
GROUP BY PERSON_ID
ORDER BY COUNTS DESC