php - how to select the id(s) from a table which are contained set of duplicate values(clm1,clm2,cl3)? -


how select id=32 , 28 contained duplicate values(product_id,place_id,product_type_id)? please me advanced thanks..

id        product_id   place_id    product_type_id  quaty       year      month 22           3           2              1            10         2015       4           28           6           1              3            10         2015       4           32           6           1              3            15         2015       5           33           11          3              6            100        2015       5           27           30          1              3            13         2015       4    

try this:

select id table1 t1 product_id in(select product_id                     table1 t2                     group product_id,place_id,product_type_id                     having count(id) > 1); 

this give you:

| id | |----| | 28 | | 32 | 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -