hi i have a table with 6 columns, amongst them the is a column called user_id which has many occurances in the table and also a column ie laptops where it references the laptops that a user has brought for some action. This also have many occurances in the table.
ID DATE LAPTOP USER_ID
1 1/1/2014 Acer 10
2 1/1/2014 Toshiba 2
3 1/1/2014 HP 5
4 1/1/2014 Acer 5
5 1/1/2014 Toshiba 5
6 1/1/2014 HP 2
7 2/1/2014 Lenovo 2
8 2/1/2014 Acer 10
9 2/1/2014 HP 2
10 2/1/2014 HP 5
i need to select the distinct laptop occurences for each user_id and not generally the distinct occurances frm the table so the desired result would be
LAPTOP USER_ID
Acer 10
Toshiba 2
HP 2
Lenovo 2
HP 5
Acer 5
Toshiba 5
whatever i ve tried seems to be far from the desired result so far
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.