Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 140391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:36:23+00:00 2026-05-11T07:36:23+00:00

I have an Informix database containing measured temperature values for quite a few different

  • 0

I have an Informix database containing measured temperature values for quite a few different locations. The measurements are taken every 15 min for all locations and then loaded with a timestamp into the same table. Table looks like this:

 locId    dtg               temp aaa      2009-02-25 10:00  15 bbb      2009-02-25 10:00  20 ccc      2009-02-25 10:00  24 aaa      2009-02-25 09:45  13 ccc      2009-02-25 09:45  16 bbb      2009-02-25 09:45  18 ddd      2009-02-25 09:45  12 aaa      2009-02-25 09:30  11 ccc      2009-02-25 09:30  14 bbb      2009-02-25 09:30  15 ddd      2009-02-25 09:30  10 

Now I would like a query that present me with the change in temperature between the two last measurements for all stations. And also, only the ones that has an updated measurement. For example in the table above, location ddd would not be included. So the result becomes:

 locId    change aaa      2 bbb      2 ccc      8 

I have tried alot but I can´t find any good solution. In reality it is about 700 locations that is asked from a web page so I think the query needs to be fairly efficient.

Would really appreciate some help!
//Jesper

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T07:36:23+00:00Added an answer on May 11, 2026 at 7:36 am
    set now = select max(dtg) from table; set then = select max(dtg) from table where dtg < now;  select locID, old.temp-new.temp from        table as old join       table as new        on old.locId = new.locID where       old.dtg = then and       new.dtg = now; 

    assumes that all times will be exact

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 78k
  • Answers 78k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer This example (http://www.codeproject.com/KB/cs/ContextHelpMadeEasy.aspx) shows how to trap the F1 key… May 11, 2026 at 3:55 pm
  • added an answer When accessing attributes / methods in statically-typed languages, lookups can… May 11, 2026 at 3:55 pm
  • added an answer When you create the thread, call the SetApartmentState() method before… May 11, 2026 at 3:55 pm

Related Questions

We are trying to duplicate one of our informix database on a test server,
Many developers seem to be either intimidated or a bit overwhelmed when an application
I have an Informix SQL query which returns a set of rows. It was
I'm using an Informix (Version 7.32) DB. On one operation I create a temp

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.