I'm trying to get the records from "tbl_gig" table while comparing different rows in it.
I tried this but no luck:
SELECT * FROM tbl_gig as t2 INNER JOIN tbl_gig as t3
WHERE t2.gig_city=t3.gig_city
AND t2.artist_id=t3.artist_id
AND t2.partner_id < t3.partner_id
GROUP BY t2.gig_eventDate;
Expected output :
gig_id gig_artist_id gig_partner_id
1 1 1
2/3 1 1/2
4 1 1
Please help on this.