SELECT current_raised,segment FROM gizmos
where created_at >= "2012-03-01"
returns 600+ rows
SELECT "current_raised","segment"
UNION
(SELECT current_raised,segment FROM gizmos
where created_at >= "2012-03-01")
returns 180 rows
Why is this happening?
unionwill remove from the result set every duplicatedcurrent_raised, segmentpair. Tryunion allinstead.Here is a reduced example of what is happening.