Random sort with distinct - Mailing list pgsql-sql

From Ozer, Pam
Subject Random sort with distinct
Date
Msg-id 216FFB77CBFAEE4B8EE4DF0A939FF1D10182C8@mail-001.corp.automotive.com
Whole thread Raw
Responses Re: Random sort with distinct
Re: Random sort with distinct
Re: Random sort with distinct
List pgsql-sql

I have the following query

 

Select Distinct VehicleMake, VehicleModel

From VehicleYearMakeModelTrim

Order by random()

Limit 10;

 

I don’t want to bring back the random number I just want the sort order to be random. How can I sort randomly?  This query breaks because random() is not in the select.

 

Thanks

 

Pam



pgsql-sql by date:

Previous
From: Dmitriy Igrishin
Date:
Subject: Re: Question about PQexecParams
Next
From: Dmitriy Igrishin
Date:
Subject: Re: Random sort with distinct