My goal is to try to find the total count of rows (table1) and the total count of those rows that have been translated (translation is in table2). I have this query that works and gives me the count of the things I want.
SELECT COUNT(a.text)
FROM table1 a
LEFT JOIN table2 b ON a.id = b.id
It just seems redundant to write the query again when I know I can just change the parameter within the COUNT()
to b.text
.
Is there a way to pass in a parameter within the COUNT()
like this COUNT(@Parameter)
and maybe do a foreach loop? FYI I'm working with webforms.. Thank you in advance!