Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
SELECT tbl.ID, tbl.dDate, tbl.col1
FROM tbl
WHERE tbl.ID=(SELECT TOP 1 ID from tbl T1 WHERE t1.col1 = (SELECT Max(t2.col1) from tbl t2) order by ddate);
SELECT
qry_TotalProduction.WellPadName,
qry_TotalProduction.ProductionDate,
qry_TotalProduction.SumOfRiskedOil
FROM
qry_TotalProduction
WHERE
(((qry_TotalProduction.WellPadName)=
(SELECT TOP 1 WellPadName FROM qry_TotalProduction t1
WHERE
t1.SumOfRiskedOil = (SELECT MAX(t2.SumOfRiskedOil)
FROM
qry_TotalProduction t2) ORDER BY ProductionDate)));
SELECT TOP 1 Max(qry_TotalProduction.SumOfRiskedOil) AS [Max Oil]
FROM qry_TotalProduction;
SELECT tblWellPads.WellPadName, tblProduction.ProductionDate, Sum(tblProduction.RiskedOil) AS SumOfRiskedOil, Sum(tblProduction.RiskedGas) AS SumOfRiskedGas, Sum(tblProduction.RiskedWater) AS SumOfRiskedWater
FROM (tblWellPads INNER JOIN tblWells ON tblWellPads.PadID = tblWells.[WellPadID]) INNER JOIN tblProduction ON tblWells.WellID = tblProduction.WellID
GROUP BY tblWellPads.WellPadName, tblProduction.ProductionDate
ORDER BY tblProduction.ProductionDate;