Table 1(Customer Table)
Id, CustomerId, IsKnownCustomer,phonemacaddress
1, NULL 0 00:9a:34:cf:a4
2, 004024 1 00:6f:64:cf:a0:93
3, 004024 1 00:6f:64:cf:a0:93
4, 004003 1 2c:0e:3d:15:12:43
6, NULL 0 2c:0e:3d:15:125
7, 004003 1 34:f3:9a:ee:53:a9
8, 004023 1 38:0B:40:DC:BA:3A
9, NULL 0 4c:66:41:11:26:16
This is the table, and data is required for all customer, unknown customer and known customer.
output like: uniquely find the records by phonemacaddress.
count Customer,| customer type|
7 all
3 unknown customer
4 known customer