Select only those records that have same multiple values for a particular column if it's existing?
0
votes
1
answer
672
views
Below is an example of my
pricing_supports
table with more than 3 millions rows.
There some rows having same values in the first_origin_id
, delivery_id
fields.
If there are records with same first_origin_id
, delivery_id
but different source
, I only want to select those records where source = 0
ID code first_origin_id delivery_id source
1 A 10 20 0
2 B 10 20 1
3 C 11 21 1
4 D 12 22 0
5 E 12 22 1
I would like result like that:
ID code first_origin_id delivery_id source
1 A 10 20 0
3 C 11 21 1
4 D 12 22 0
How can I do for good performance?
Asked by Dương Khoa
(1 rep)
Sep 20, 2018, 04:24 AM
Last activity: Jan 27, 2025, 05:04 PM
Last activity: Jan 27, 2025, 05:04 PM