JOIN table

User avatar
sal21
PlatinumLounger
Posts: 4534
Joined: 26 Apr 2010, 17:36

JOIN table

Post by sal21 »

based this SQL, possible to join the table SAM_COMUNI.ISTAT, with RCS_ITALIA.ISTAT

SELECT PROVINCIA, PR, REGIONE, COUNT(COMUNE) FROM (SELECT DISTINCT PROVINCIA, PR, REGIONE, COMUNE FROM RCS_ITALIA WHERE RCS_ITALIA.ANNO=2020) GROUP BY PROVINCIA, PR, REGIONE

tks

User avatar
HansV
Administrator
Posts: 79671
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: JOIN table

Post by HansV »

Do you want to return fields from SAM_COMUNI? If so, do you want to group by them, or count them, or sum them, etc.?
Best wishes,
Hans