php - Calculating Total salary, Based on Hours in postgres -
i want write query to calculate total pay base of operations on working hours.
in case have 2 tables :
machinetypes fields machine_rent(per hr bases). machines (it maintains info of machine comes on daily basis like: machine_name, timein, timeout, task) now want populate total amount of particular machine, how many hours machine worked , multiply machine_rent calculate totalpay.
ok, how this sqlfiddle?
i created random usage , took current on-demand aws per-instance cost (linux in virginia).
exercise reader: computing grand total should self-evident.
php postgresql
No comments:
Post a Comment