Nice writeup, Eric. We need all that, plus an easy and straightfoward
method of excecuting ad-hoc SQL.
Eric Dobbs <[EMAIL PROTECTED]> writes:
> Taking a moment to question design goals for the new query model.
> As long as we're talking about redesigning from the ground up...
> Which of the following example sql statements would you like to
> be able to construct with the new query model?
>
> -Eric
>
> 1. simple selects
> select * from some_table
> where some_id = n;
>
> 2. multi-table joins
> select table1.name,table2.type_name
> from table1,
> table2,
> table3
> where table1.description like '%foo%'
> and table1.one_id=table3.one_id
> and table2.two_id=table3.two_id
>
> 3. compound where clauses
> select table1.name
> from table1
> where (table1.age>21 and table1.age<35)
> or (table1.age>50 and table1.age<65)
>
> 4. functions
> select sum(table1.amount) as sum
> from table1
> where table1.amount<5000
>
> 5. group by ... having
> select type, sum(price)
> from titles
> where price <= 5
> group by type
> having sum(price) > 50
>
> 6. sub-queries
> select table1.title)
> from table1
> where table1.price =
> (
> select min(table1.price)
> from table1
> )
>
> select distinct pub_name
> from publishers
> where pub_id not in
> (
> select pub_id
> from titles
> where type='business'
> )
>
> 7. transactions
> begin
> <statement1>
> <statement2>
> <statement3>
> commit
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]