Igor Korot, on Wednesday, February 19, 2020 04:30 PM, wrote...
>
> Hi,
>
> On Wed, Feb 19, 2020 at 2:12 PM Jose Isaias Cabrera <jic...@outlook.com>
> wrote:
> >
> >
> > Thanks, Keith. Darn it! GROUP BY and ORDER BY! Got it, it's working
> now. Thanks.
> >
> >
> > ________________________________
> sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> on behalf of
> Keith Medcalf <kmedc...@dessus.com>
> > Sent: Wednesday, February 19, 2020 03:09 PM
> > To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
> > >
> >
> > 1) In the first two query's, why do you have a condition on the LHS
> table in the LEFT JOIN conditions?
> > 2) In the last query, why do you have a condition on the RHS table of
> the LEFT JOIN in the WHERE clause?
> >
> > These would seem to indicate that you are using a LEFT JOIN when you
> really do not want a LEFT JOIN (maybe you are a LEFT lover?) ... it is a
> common ailment.
>
> I hate MS-ism. ;-)
> Why not just use a simple WHERE a.id = b.id?

That's what I was using originally, but I was only getting one record.  I was 
missing HAVING.

> Less typing anyway...
>
> Thank you.
>
> >
> > Also, you are only getting one row because you only asked for one row.
> If you request an aggregate and specify no GROUP BY then you can only ever
> get one row as a result -- the one aggregate row.
> >
> > If you want more than one row you need to specify by what you want the
> results grouped in the GROUP BY clause.
> >
> > --
> > The fact that there's a Highway to Hell but only a Stairway to Heaven
> says a lot about anticipated traffic volume.
> >
> > >-----Original Message-----
> > >From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> On
> > >Behalf Of Jose Isaias Cabrera
> > >Sent: Wednesday, 19 February, 2020 12:46
> > >To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
> > >Subject: [sqlite] Why do I only get one record?
> > >
> > >
> > >Greetings!
> > >
> > >Newbie here again... ;-)
> > >
> > >Please take a look at this query,
> > >
> > >sqlite> SELECT
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to