Salve ragazzi, ho 3 tabelle
U
id|uri|host
1 |xxx|h1
2 |xxx|h2
3 |xxx|h2
4 |xxx|h3
UK
id|uid|kid|datetime
1 | 1 | 2 |
2 | 1 | 3 |
3 | 2 | 4 |
4 | 2 | 2 |
5 | 4 | 2 |
6 | 4 | 1 |
7 | 3 | 4 |
K
id|name
1 |name1
2 |name2
3 |name3
4 |name4
expected result:
K1 has 1 host
K2 has 3 host
K3 has 1 host
K4 has 1 host (!! there are 2 U in the same host)
Voi come fareste a trovare quanti U.host sono presenti per una K (su tutte le K)?![]()