You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That query doesn't really make sense. I assume you want to know the number of rows in sub that have the same id as main - not the total rows in sub. But I think I understand the larger question.
We don't support sub-queries in the select list right now, but it should be relatively simple to add it.
In the mean time, it might be helpful to think of this particular query as a join (which it actually is). You could code it like this:
selectmain.id, count(*) as cnt
from main join sub onmain.id=sub.idgroup bymain.idwheremain.id= ?
if i want to write sql like this,
what should i do?
The text was updated successfully, but these errors were encountered: