Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
firstly apologies for the lengthy title
[Top Area]:
load Area,
sum(Lane_1_Total) as Area_Total,
RecNo() as Record_Number
Resident [MIDAS+AQMA]
where Time >= now()-(1/24)
group by Area
order by Lane_1_Total;
ok im not going to bottle feed you guys you can see what the above table does.
I am using it to set variables for the top 3 Areas.
now moving forward i want to create a table of Max and Mins.
I store and drop this table every reload so each time i have the table of the past hour.
I want a new Table with the below structure that basically says for each area if the current total (as in just loaded by the above) is less than the archived min use that min if not keep the current archived Min. Opposite for Max
[Area Max Min]:
load Area
Area_Max
Area_Min
from ??
thanks all
Can you please elaborate more with Sample data and needed output?
You may need to concatenate all your stored qvd 's onto your new resident table and then do a group by / order by / min() / max()
attached is my Top Area table loaded today (im developing with old data so i dont have the where Time > now()-60mins bit)
I want to create a new table that has a dimension for max and min.
so the first run the Area_Total will be both max and Min.
the second run however if the new area_Total is lower than the current stored min that replaces the min, same process but opposite for Max.
hopefully that makes more sense.