Topic: Sampling of several tables with record count count in one of them
All good afternoon!
Help to understand connection of the given several tables please.
At once I will tell, I not the student doing to a lab, simply faced on operation a problem which it is impossible to solve.
A problem Essence:
There are two tables (actually more but if help to understand I extrapolate on necessary kol-in itself):
account number group 40702 1 40802 1 33021 3 33023 3 33024 3 33025 3 groups id name 1 regular accounts 2 obsolete accounts 3 vip accounts
I try to count an amount of accounts in each group and to deduce in a type:
account.group count (account.group) groups.name 1 2 regular accounts 3 4 vip accounts
Here such request does not work since groups.name is not grouped
select account.group count (account.group), groups.name from account, groups where account.group = groups.name group by account.group order by account.group