Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想写一个query来计算基于工作时间的总工资。
query
就我而言,我有两张桌子:
machineTypes
machine_rent
machines
machine_name
timein
timeout
task
现在我想填充特定机器的总量,即该机器工作了多少小时,然后乘以machine_rentas 来计算totalpay.
totalpay
好的,这个 sqlfiddle怎么样?
我创建了一些随机使用,并采用了当前的按需 AWS 每个实例成本(弗吉尼亚州的 Linux)。
读者练习:现在计算总计应该是不言而喻的。