[ Date Index ]
[ Thread Index ]
[ <= Previous by date /
thread ]
[ Next by date /
thread => ]
Re: [LUG] SQL query help please
- To: list@xxxxxxxxxxxxx
- Subject: Re: [LUG] SQL query help please
- From: Sebastian <seabass@xxxxxx>
- Date: Fri, 11 Sep 2020 13:07:26 +0100
- Content-disposition: inline
- Delivered-to: dclug@xxxxxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dcglug.org.uk; s=1586423162; h=Sender:Content-Transfer-Encoding: Content-Type:Reply-To:List-Subscribe:List-Help:List-Post:List-Unsubscribe: List-Id:Subject:In-Reply-To:MIME-Version:References:Message-ID:To:From:Date: Cc:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Owner:List-Archive; bh=NNq3LrPcMCSzGcr3tOsDCFBnWyT4MOrf762LsOgnwxo=; b=QMY1HkRy/6TGemsePsJsHMlnjU nWDCdpXtLkkL+IWWfs6PddtEtcXaftyowa29879ulxzYJ4TBhvBhIPVRxvtY99xbfIpOmiBeEXeHj GoiVhTpVssJy47iWXOk7SjHI/rrT4jGKZAsxxQ6vPkQGMkSP1I+eBYmcHP0RVVXkByN4=;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599826071; bh=xYikuSxD6tKYi09fiEhz4Gws7V3twdhM1tB3epmJXmo=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=PqPBtv+cta7QU0tKWfZtKw4LGJ8GdPhDKgqUwciisPbuRC471Q01bO8qDxXGQrF+c bOjj52ye6Jl4RMkBN2wnn1JD0uwfqPwCz1fh0MfJ1+3FkI0geh2r1Nm2qgeOJxinUM y87xXZ+6tpKMbFZ48xW9JiBwjz842ZGcOvVS4v14=
> > SELECT COUNT(*) FROM earthquake WHERE cause = 'earthquake';
> > SELECT occured_on, magnitude, place, cause FROM earthquakes ORDER BY magnitude
> > DESC LIMIT 3;
> >
>
> table earthquake <> earthquakes :-)
That was just a typo in my email! My database uses 'earthquake'
exclusively, and the tutorial uses 'earthquakes'.
With your help on #DCGLUG on IRC, I've managed to fix all the records
now - the dataset is a CSV with CRLF line endings (the tutorial
presenter uses Windows), so there were stray carriage returns when I
imported it with:
>... lines terminated by '\n'
This is why the queries failed - the string lookup needs to be exact.
Anyway, thank you Stinga, and also everyone else who has investigated
this.
Best wishes, Sebastian
Freenode: 'seabass'
--
The Mailing List for the Devon & Cornwall LUG
https://mailman.dcglug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq