logo       

Re: Question: msg#00175

db.postgresql.advocacy

Subject: Re: Question



For the last line , anyone has some ideas for a one line postgresql query to represent our logic power ? :D

SELECT sum(coalesce((extract(epoch from time_spent)/(60*60))::numeric(20,2),0) * coalesce(hourly_rate, 0))::numeric(20,2) AS total_cost







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


--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@xxxxxxxxxxxxxxxxx - http://www.commandprompt.com
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL

Attachment: jd.vcf
Description: Vcard


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise