Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/10/2021 in all areas

  1. Like this? SELECT id as ids , job_number , line_item FROM production_data WHERE line_item = '' UNION SELECT GROUP_CONCAT(id separator ', ') as ids , job_number , line_item FROM production_data GROUP BY job_number, line_item HAVING COUNT(*) > 1; [edit] If you want the ids in their own rows, then SELECT id , job_number , line_item FROM production_data WHERE line_item = '' UNION SELECT p.id , dupes.job_number , dupes.line_item FROM production_data p JOIN ( SELECT job_number , line_item FROM production_data GROUP BY job_number, line_item HAVING COUNT(*) > 1 ) dupes USING (job_number, line_item);
    1 point
This leaderboard is set to New York/GMT-05:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.