| From: | Yasir Malik <ymalik(at)cs(dot)stevens(dot)edu> |
|---|---|
| To: | PostgreSQL <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: Am I crazy or is this SQL not possible |
| Date: | 2006-06-01 19:47:57 |
| Message-ID: | Pine.NEB.4.64.0606011540570.1881@pink-elephant.cs.stevens-tech.edu |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2006-06-01 19:54:05 | Re: Am I crazy or is this SQL not possible |
| Previous Message | Aaron Bono | 2006-06-01 19:30:31 | Re: Am I crazy or is this SQL not possible |