>
> 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@postgresql.org 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@commandprompt.com - http://www.commandprompt.com
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL