Re: Help creating a bimodal result
Date: Sat, 21 Jul 2001 21:41:13 GMT
Message-ID: <j3xL6.2717$h4.1008717_at_news101.telia.com>
Hi Bill
To produce a SELECT-statement that groups your temperature measurements with respect to the temperature, you could try the following:
select temp, count(*)
from cities
group by temp;
If you only want those temperatures, that have been measured in two or more cities, you could write:
select temp, count(*)
from cities
group by temp
having count(*)>1;
/Jørn
"Bill Kincaid" <billkincaid_at_mindspring.com> skrev i en meddelelse
news:9dj77e$1cl$1_at_nntp9.atl.mindspring.net...
> Am having a problem determining a method of creating a query producing a
> bimodal join.
> Example:
>
> Take a table with 15 temperatures of cities around the world from the
CITIES
> table.
>
> CITIES table
> City A30
> Temp N
>
> New York 12
> Atlanta 57
> Philadelphia 25
> San Francisco 53
> Los Angeles 57
> San Diego 55
> Mexico City 35
> Lima 35
> Quebec 22
> Birmingham 57
> London 40
> Portland 47
> Seattle 49
> Chicago 35
> Phoenix 57
>
> You can see that the bimodal results in 4 examples of 57 and 3 of 35.
> How do I create a SQL query which will produce this result?
>
> Thanks anyone for your help
> Bill Kincaid
> BillKincaid_at_mindspring.com
>
>
>
>
Received on Sat Jul 21 2001 - 23:41:13 CEST