SQL: Divide the sum of values in one table with the count of rows in another -
is possible to, in single query, sum bunch of values in 1 table, , divide count of rows in another? there common id/key in both tables...
fyi, win points least info provided in question. answer it's possible...here psuedo code since i'm guessing @ tables , columns
select summing / counting whynot (select id, sum(whatever) summing where_ever ) inner join (select id, count(1) counting what_ever)b on a.id = b.id question = 'vague' group a.id
Comments
Post a Comment