Untitled

mail@pastecode.io avatar
unknown
mysql
a year ago
311 B
1
Indexable
Never
SELECT game_cards, GROUP_CONCAT(game_id) as similar_game_ids, COUNT(*) as similar_games
FROM (
  SELECT game_id, GROUP_CONCAT(card ORDER BY number_card) as game_cards
  FROM games
  WHERE number_card <= 6 AND platforma = 'ego'
  GROUP BY game_id
) as game_groups
GROUP BY game_cards
HAVING COUNT(*) > 1;