2

I have a large table which structure looks like that:

table, data structure

This is just to show you what I want to achieve, because my original table has nearly 1 million records.

Now imagine that I have temperature values calculated for every region which is represented by column geoid.

In this example I have 4 regions. For each region I have temperature values calculated 2 x daily for every day in a year.

What I need to get, is to calculate max temperature value for each day, thus in this example I need something which let me:

select first 8 rows -> calculate max temp. value for each geoid -> then select next 8 rows -> calculate max temp. value for new selection.

I need this to repeat for every day in a whole year.

How can I do this?

closed as off-topic by Vince, Dan C, Kersten, Mapperz Oct 19 '16 at 15:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking help to debug/write/improve code must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Providing a clear problem statement and evidence of a code attempt will help others to help you. See: How to create a Minimal, Complete, and Verifiable example." – Vince, Kersten, Mapperz
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    This sounds like a really tedious way to accomplish what could be a single Python cursor query if you calculate the statistics.on your own. Either way, it's GIS SE policy to include code in coding questions, so you'll need to at least make an attempt before we can help fix any issues. – Vince Oct 19 '16 at 11:06
  • 2
    You should start by creating a field for date values and populate it with your dates (or just day of year if that's enough). OIDs are not static and you shouldn't base a calculation like this on them. – Dan C Oct 19 '16 at 13:35