Hi,
Something very straightforward looks like this, I guess:
select * from users u
where (
select count(*) from users u1
where u1.username = u.username
and u1.signedup> u.signedup
)< 5
to get recent results. Or "u1.signedup< u.signedup"
for the first ones. But that doesn't work i
Hi, All
I'm trying to make a kind of upsert for the following table:
CREATE TABLE sequences (
section VARCHAR( 50 ) NOT NULL,
name VARCHAR( 50 ) NOT NULL,
counter BIGINT NOT NULL
);
CREATE UNIQUE INDEX IDX_SEQUENCES_SN ON sequences(section, name);
Next, I execute the following two
On 25.11.2010 12:51, MIkhail Puzanov wrote:
>
>
> 2010/11/25 Tom Lane mailto:t...@sss.pgh.pa.us>>
>
> "Mikhail V. Puzanov" <mailto:misha.puza...@gmail.com>> writes:
> >-- increment and get the counter if exists
> > UPDATE