ben would something like this work in your situation?
SELECT customer.id, customer.name, deliveries.calendar_day,
deliveries.delivered
FROM ben_customers as customer, ben_deliveries as deliveries
WHERE customer.id = deliveries.customers_id
and deliveries.calendar_day in (Select day
Just for fun, another approach since I believe pg supports it:
select whateverFields
from object_val as outer
where (outer.object_id,
outer.object_val_type_id,outer.observation_date) IN
(select inner.object_id,
inner.object_val_type,max(inner.observation_date)
from object_val as inner
where i
I just finished reading 'The Art of SQL' by Stephane Faroult who has a
chapter (ch 6) discussing this very topic. I strongly recommend any
developer dealing with databases take a few days to read this
narrative.
A solution would seem to depend on whether you have many objects which
change in meas
I agree that option 3 is the way to go. There is a little reading at:
http://www.varlena.com/varlena/GeneralBits/110.php
which may be of interest.
Tim Allen wrote:
> lifeisgood wrote:
> > 3. Different answer tables each with answer types - same problem as 2
> > but even harder.
>
> This is the o
key linking to the qid.
I had a completely different problem on my mind (testing user's
knowledge). Sorry about that.
macgillivary wrote:
> I agree with Tim, that your option 3 is really not all that hard, and I
> suggest would provide you with the best solution. I'm assuming,
I agree with Tim, that your option 3 is really not all that hard, and I
suggest would provide you with the best solution. I'm assuming,
however, that your application asks the question and checks the user
supplied answer with the answer in the db (and not Jeopardy style). I
might add a 'join' or
Purely out of curiosity, what sort of execution time do you get if you
use:
SELECT *
FROM (SELECT username,acctstarttime FROM radacct WHERE username='user'
ORDER BY acctstarttime ) allstarttimes
LIMIT 50;
Graeme Hinchliffe wrote:
>
> Now, if I do the following:
>
> SELECT username,acctstarttime
for an excellent book on keeping things where they should be go buy:
"The ART of SQL" by Stephane Faroult. Sample chapter online.
http://www.oreilly.com/catalog/artofsql/
It's an excellent read, and provides ample arguments for keeping
constraint management with the database and not in each of th