Re: Random sort with distinct - Mailing list pgsql-sql

From Dmitriy Igrishin
Subject Re: Random sort with distinct
Date
Msg-id AANLkTimJi+TfKsuenpKcThuNfPpTrhW6j1kBXV1QsKzG@mail.gmail.com
Whole thread Raw
In response to Random sort with distinct  ("Ozer, Pam" <pozer@automotive.com>)
Responses Re: Random sort with distinct  ("Ozer, Pam" <pozer@automotive.com>)
List pgsql-sql
Hey Ozer,

How about dynamic queries?

2010/10/2 Ozer, Pam <pozer@automotive.com>

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






--
// Dmitriy.


pgsql-sql by date:

Previous
From: "Ozer, Pam"
Date:
Subject: Random sort with distinct
Next
From: Lee Hachadoorian
Date:
Subject: Re: Random sort with distinct