how to find number of records in both table using join. i have two tables table1 and table2 with same structure.
table1
| id | item |
|---|---|
| 1 | A |
| 1 | B |
| 1 | C |
| 2 | A |
| 2 | B |
table2
| id | item |
|---|---|
| 1 | A |
| 1 | B |
| 2 | A |
| 2 | B |
| 2 | C |
| 2 | D |
Output should be like this.
| id | table1.itemcount | table2.itemcount |
|---|---|---|
| 1 | 3 | 2 |
| 2 | 2 | 4 |