Re: Am I crazy or is this SQL not possible - Mailing list pgsql-sql

From Yasir Malik
Subject Re: Am I crazy or is this SQL not possible
Date
Msg-id Pine.NEB.4.64.0606011540570.1881@pink-elephant.cs.stevens-tech.edu
Whole thread Raw
In response to Re: Am I crazy or is this SQL not possible  ("Aaron Bono" <postgresql@aranya.com>)
Responses Re: Am I crazy or is this SQL not possible
Re: Am I crazy or is this SQL not possible
List pgsql-sql
> It is a hack, but when someone wants you to do something in a way
> different from the norm, aren't they asking for a hack?
>
> SQL Server does something like
> select top (1) from ....
>
> I am thinking this is NOT a SQL-99 standard.
>
This was an interview with Amazon, and I don't think Amazon wanted a hack. 
I hope Amazon doesn't use hacks.  There has to be another way.  It would 
be cruel if they expected me know some database specific functionality.
Here's what I gave them:
select value  from table t where t.value >  (select t2.value     from table t2);

which would be fine if the sub-select returned simply a list, but that 
isn't even valid SQL (I didn't get the job, BTW).

Yasir


pgsql-sql by date:

Previous
From: "Aaron Bono"
Date:
Subject: Re: Am I crazy or is this SQL not possible
Next
From: Alvaro Herrera
Date:
Subject: Re: Am I crazy or is this SQL not possible