C# 如何在一个ASP GridView中组合4个MYSQL查询
我想在一个gridview中获得以下查询的结果 结果应为C# 如何在一个ASP GridView中组合4个MYSQL查询,c#,mysql,asp.net,gridview,C#,Mysql,Asp.net,Gridview,我想在一个gridview中获得以下查询的结果 结果应为 Early|Late|Excess 我应该使用什么数据集?我不想在一个Sql语句中进行所有查询,请帮助 SELECT reports.inone, SEC_TO_TIME(sum(TIMESTAMPDIFF(second,reports.inone,date_FORMAT(reports.inone,'%Y-%m-%d 08:00:00') ))) AS early FROM `wave`.`reports` WHERE per
Early|Late|Excess
我应该使用什么数据集?我不想在一个Sql语句中进行所有查询,请帮助
SELECT reports.inone, SEC_TO_TIME(sum(TIMESTAMPDIFF(second,reports.inone,date_FORMAT(reports.inone,'%Y-%m-%d 08:00:00') ))) AS early
FROM `wave`.`reports`
WHERE personnelnr=12793
and reportdate between "2015/01/01" and "2015/10/01"
and date_FORMAT(reports.inone,'%T') < '08:00:00'
and time_to_sec(reports.inone) < 28200
SELECT SEC_TO_TIME( sum(TIME_TO_SEC(reports.lateone ))) AS Late
FROM `wave`.`reports`
where personnelnr=12319
and reportdate between "2015/09/01" and "2015/09/30"
and reports.lateone >= '00:10:00';
SELECT SEC_TO_TIME( sum(TIME_TO_SEC(reports.otone))) AS Excess
FROM `wave`.`reports`
where personnelnr=12319
and reportdate between "2015/09/01" and "2015/09/30"
and reports.otone >= '00:10:00';