MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Matthias Pigulla Date:March 11 1999 8:53pm
Subject:mysql: Need help building query - reposted
View as plain text  
Hi Monty & folks,

some weeks ago I posted the following (snipped). Sorry for bothering you

Matthias Pigulla wrote:
> I have tables for the threads (id and topic), postings (id, key
> referencing a thread, key referencing its author and the text) and the
> users (id, properties i.e. nickname).
> Now, I want to generate a list of all discussion threads in a certain
> board. I want it to contain *) the date of the last posting *) the user
> who initiated the thread with the first posting.

The problem was how to select a certain row of a set before the rows are
GROUPed together. { All rows have the same value in one column, but
different values in another. I want to get the row - and only one row
for each value in the first column - with the smallest value in the
second column. }

I was pointed to the HAVING clause, but can't get it to work. Neither
can I find a good explanation for it in the docs. Can you explain it to
me please?

What about SELECT DISTINCT? Does it work in the .19 release?

   w e b f a c t o r y | matthias pigulla  mp@stripped

mysql: Need help building query - repostedMatthias Pigulla11 Mar
  • mysql: Need help building query - repostedMichael Widenius12 Mar