My bad for not explaining what I wanted up front. Thanks! the new query looks to be working.
On Wednesday, July 3, 2013 3:15:57 AM UTC-7, Noel Grandin wrote: > > > On 2013-07-03 10:04, TrendTimer.com wrote: > > > > As should be obvious, this is stock market data. I want the query to > > return only the results where the max date is less that 2013-07-02. > > In other words, your query is returning a row for every symbol, not > > just the ones that haven't been updated. Have any thoughts? > > > > Explaining your use-case the first time around would have been helpful. > > WHERE clauses operate on the data before the GROUP BY operation. > You want to be using a HAVING clause, which operates on the data after > the GROUP BY operation. > > select localSymbol, max(localDate2) > from tre_xignite > group by localSymbol > having max(localdate2) < '2013-07-02' > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out.
