Can anyone help me with bimodal queries?

Can anyone help me with bimodal queries?

Post by Bill Kincai » Sun, 13 May 2001 20:39:18



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

 
 
 

Can anyone help me with bimodal queries?

Post by BP Margoli » Mon, 14 May 2001 01:51:55


Bill,

Please do not post the same question independently to multiple newsgroups.

Please see my reply in .datawarehouse

-------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.


> 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



 
 
 

Can anyone help me with bimodal queries?

Post by Francisco Meji » Sun, 03 Jun 2001 05:09:36


the following query returns the data below, Is this what you are looking
for?

regards
Francisco Mejia

SELECT   'TIMES' = COUNT(TEMPERATURE),TEMPERATURE
FROM CITIES
GROUP BY TEMPERATURE

TIMES       TEMPERATURE
----------- -----------
1           22
1           25
3           35
1           40
1           47
1           49
1           53
1           55
3           57
1           120
1           570

CREATE TABLE Cities
(city_name CHAR(30),
 temperature INTEGER NOT NULL);

INSERT INTO Cities VALUES ('New York', 120);
INSERT INTO Cities VALUES ('Atlanta', 570);
INSERT INTO Cities VALUES ('Philadelphia', 25);
INSERT INTO Cities VALUES ('San Francisco', 53);
INSERT INTO Cities VALUES ('Los Angeles', 57);
INSERT INTO Cities VALUES ('San Diego', 55);
INSERT INTO Cities VALUES ('Mexico City', 35);
INSERT INTO Cities VALUES ('Lima', 35);
INSERT INTO Cities VALUES ('Quebec', 22);
INSERT INTO Cities VALUES ('Birmingham', 57);
INSERT INTO Cities VALUES ('London', 40);
INSERT INTO Cities VALUES ('Portland', 47);
INSERT INTO Cities VALUES ('Seattle', 49);
INSERT INTO Cities VALUES ('Chicago', 35);
INSERT INTO Cities VALUES ('Phoenix', 57);


> 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


 
 
 

1. Can anyone help with bimodal queries

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

2. Dataflex and VB

3. Can anyone help me with bimodal queries?

4. Q: Jet 2.5 GPF while using "UNION ALL"

5. Anyone know of some canned (cheap or free) DB performance testing software

6. dbcc commands as a resultset

7. Help creating bimodal

8. Varaibles in SQL

9. Can you create bimodal joins?

10. SQL Query Statement, Can anyone please help!!

11. Can anyone help with this query?

12. can anyone help me modify this query

13. Can anyone help with a SQL query that is just beyond me