TheGuru Posted February 5, 2013 Share Posted February 5, 2013 I have a table in MYSQL as follows Id-------NAME 1-------Black 2-------Red-- 3-------Green 4-------Black 5-------Green 6-------Yellow 7-------Orang 8-------White 9-------Black 10-------violet 11-------maroA 12-------indiA 13-------Blue 14-------Yellow 15-------Orane 16-------White 17-------White 18-------White I need to get the id of each color names where the condition matches unique names for each set of five rows and if any duplicate occurs then it has to be moved to end of the result. Note: I don’t want the count (max/min) as a result for each color names output: ID: 1 8 6 NAME: Black | white | yellow | violet | orange | - Black | white | yellow | violet | orange | - Blue| maroon | white| white | white | Kindly guide if this is possible to get MYSQL query Link to comment https://forums.phpfreaks.com/topic/274050-mysql-complex-query-to-get-data-group-by-name-with-unique-value-for-each-set-of-five/ Share on other sites More sharing options...
trq Posted February 5, 2013 Share Posted February 5, 2013 Seems ridiculous enough. What have you tried? Link to comment https://forums.phpfreaks.com/topic/274050-mysql-complex-query-to-get-data-group-by-name-with-unique-value-for-each-set-of-five/#findComment-1410183 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.