MySQL Forums
Forum List  »  Newbie

Re: SQL Query to prevent multiple results of same offer
Posted by: Peter Brawley
Date: February 24, 2016 02:41PM

> no same airports, on the same date, in the same hotel.

If you Group By airport, date, hotel, then you'll get one row per unique combo of those, and arbitrary values for other columns. To remove the arbitrariness, use min(), max() as desired on the arbitrary columns.

To see what's going on, write out the column names, don't use Select *.

Options: ReplyQuote


Subject
Written By
Posted
Re: SQL Query to prevent multiple results of same offer
February 24, 2016 02:41PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.