您可以在sql语句中的case子句中使用cost字段。例如:
case when <<your clause for night shift>> then (slength*10)+(0.25*10*slength)else (slength*10) end as cost
假设它是每小时10 $。您可以根据您的业务规则设置夜班条件。

您可以在sql语句中的case子句中使用cost字段。例如:
case when <<your clause for night shift>> then (slength*10)+(0.25*10*slength)else (slength*10) end as cost
假设它是每小时10 $。您可以根据您的业务规则设置夜班条件。