2007/7/27, Carol Cheung <[EMAIL PROTECTED]>:
db=# select * from tester order by birth_year;
birth_year | salary
+
1946 | 78000
1949 | 61000
What is the data type of the birth_year column? I'd suggest using
date if you can, as what it is is a date with
On 7/27/07, I wrote:
> On 7/27/07, Carol Cheung <[EMAIL PROTECTED]> wrote:
> > Something like:
> >
> > decade | average(salary)
> > ---+-
> >1940 | 69500
> >1950 | 5.33
> >1960 | 53000
> >1970 | 40333.33
>
> CREATE TABLE tester (
> birth_year integer,
>
Hello
you can use CASE like
SELECT CASE
WHEN birth_year BETWEEN 1940 AND 1949 THEN 1940
WHEN birth_year BETWEEN 1950 AND 1959 THEN 1950
WHEN birth_year BETWEEN 1960 AND 1969 THEN 1960
WHEN birth_year BETWEEN 1970 AND 1979 THEN 1979 END, AVG(salary)
FROM tester GROUP BY 1 ORDER BY 1;
R
On 7/27/07, Carol Cheung <[EMAIL PROTECTED]> wrote:
> Something like:
>
> decade | average(salary)
> ---+-
>1940 | 69500
>1950 | 5.33
>1960 | 53000
>1970 | 40333.33
CREATE TABLE tester (
birth_year integer,
salary numeric(10,2)
);
SELECT
SUBSTRING(T
Carol Cheung wrote:
Hello,
Here's my table:
db=# select * from tester order by birth_year;
birth_year | salary
+
1946 | 78000
1949 | 61000
1951 | 58000
1953 | 56000
1958 | 52000
1962 | 5
1965 | 45000
1967 |
Hello,
Here's my table:
db=# select * from tester order by birth_year;
birth_year | salary
+
1946 | 78000
1949 | 61000
1951 | 58000
1953 | 56000
1958 | 52000
1962 | 5
1965 | 45000
1967 | 6
1968 |
chester c young escreveu:
having problem joining these correctly:
schedule
- cal_id references calendar not null
- usr_id references users not null
= unique( calZ_id, usr_id )
- result_no not null
activity
- cal_id references calendar not null
- usr_id references users not null
= unique( cal_id
On 27.07.2007, at 10:48, Stefan Zweig wrote:
hi list,
this is my query:
select
*
from _g2977
where
id=floor(random() * (900));
in table _g2977 i have id(s) from 1 up to 900. i just want to
select one random dataset by the above query but i does not work.
actually i get sometime zero, som
Good day, Jyoti.
JS> we can use any of the "untrusted" procedural languages
JS> http://www.pgsql.cz/index.php/PL/Perlu_-_Untrusted_Perl_(en)
What !! There is no need to have
CREATE OR REPLACE FUNCTION
open FILE, $_[0]; my @cntn = ();
while () { }
__You as man (by hands) convert__ tr
Στις Παρασκευή 27 Ιούλιος 2007 10:48, ο/η Stefan Zweig έγραψε:
> hi list,
>
> this is my query:
>
> select
> *
> from _g2977
> where
> id=floor(random() * (900));
>
> in table _g2977 i have id(s) from 1 up to 900. i just want to select one
> random dataset by the above query but i does not work.
>
On 07/27/2007 09:48 AM, Stefan Zweig wrote:
hi list,
this is my query:
select
*
from _g2977
where
id=floor(random() * (900));
in table _g2977 i have id(s) from 1 up to 900. i just want to select one random
dataset by the above query but i does not work.
actually i get sometime zero, some
hi list,
this is my query:
select
*
from _g2977
where
id=floor(random() * (900));
in table _g2977 i have id(s) from 1 up to 900. i just want to select one random
dataset by the above query but i does not work.
actually i get sometime zero, sometimes one, sometimes two and sometimes even
th
12 matches
Mail list logo