Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
select sum() possible or not ?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
joerg.naumann  
View profile  
 More options Mar 14 2002, 2:54 am
Newsgroups: muc.lists.postgres.questions
From: joerg.naum...@miele.de
Date: 14 Mar 2002 08:54:28 +0100
Local: Thurs, Mar 14 2002 2:54 am
Subject: [GENERAL] select sum() possible or not ?
Hello,

I'm using PostgreSQL 7.1

I have a table like :

date logon     logoff
---------------------------------
01-01-02 | 12:02:03 | 12:04:23
01-01-02 | 12:05:13 | 12:08:13
01-01-02 | 13:02:03 | 13:04:23
01-01-02 | 14:02:03 | 14:04:23
01-02-02 | 08:59:03 | 09:09:23
........

and I want to do the following select :

select sum(logoff - logon) from online;

but I receive a error that it's not possible to select a aggregate function
sum(time).

Does someone have an idea why, is there a configuration switch which could solve
the problem?

Thanks

Jörg Naumann

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majord...@postgresql.org)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephan Szabo  
View profile  
 More options Mar 14 2002, 10:51 am
Newsgroups: muc.lists.postgres.questions
From: Stephan Szabo <ssz...@megazone23.bigpanda.com>
Date: 14 Mar 2002 16:49:21 +0100
Local: Thurs, Mar 14 2002 10:49 am
Subject: Re: [GENERAL] select sum() possible or not ?

On Thu, 14 Mar 2002 joerg.naum...@miele.de wrote:

I'd suggest upgrading to 7.2, it looks like the above works there.
Failing that maybe try a cast to interval? cast((logoff-logon) as
interval)

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majord...@postgresql.org so that your
message can get through to the mailing list cleanly


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »