Skip site navigation (1) Skip section navigation (2)

Problem with sql

From: "x asasaxax" <xanaruto(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Problem with sql
Date: 2008-10-29 02:36:12
Message-ID: 91495cb0810281936x74446f92ld48c92dbfffdbc6f@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
Hi everyone,

   I have two tables:

table_1: product_code, atualization_date
table_2: id, date, value

I need to get the value of table 2 that has the greatest date that is minor
that atualization_date.

The select should return something like that:
unique product_codeĀ“s, with their atualization_date and their value

Did anyone knows how to solve this problem?

Thanks a lot.

Responses

pgsql-general by date

Next:From: David WilsonDate: 2008-10-29 03:43:58
Subject: Re: postgresql and Mac OS X
Previous:From: Jason LongDate: 2008-10-29 02:10:25
Subject: Decreasing WAL size effects

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group