I'm old and forgot how to SQL, so instead of re-learning SQL I just fetch and store individual rows and do everything else in Python. Like an animal.
-
-
Replying to @oe1cxw
I guess you know someone who could help out with a little SQL...
1 reply 0 retweets 1 like -
Replying to @MarkusWinand
Yes, I was thinking about pinging you, but some of that code is so horrible, I'm afraid you won't ever talk to me again after you've seen it. :D I'll just secretly read your book and then claim I knew it all all along.. ;)
2 replies 0 retweets 1 like -
Replying to @oe1cxw
You are over estimating my average client ;) I’ve seen a lot...
1 reply 0 retweets 1 like -
Replying to @MarkusWinand
Well, have a laugh: I just re-discovered that count(DISTINCT ...) exists. So I'm now fixing the queries where I do something like SELECT count(*) FROM (SELECT 1 FROM ... GROUP BY ...); But here's the real question: "COUNT" or "count"? :D
2 replies 0 retweets 1 like -
Replying to @oe1cxw
But that’s no big issue—bulky but not disastrous. Upper case tells the database that it is urgent ;)
1 reply 1 retweet 3 likes -
Replying to @MarkusWinand
So maybe I should be using uppercase COUNT here to, you know, speed it up a bit.. :Dpic.twitter.com/zesABoljv5
1 reply 0 retweets 0 likes -
Replying to @oe1cxw
Basically this. Details depend on the data model an your expecatations. E.g. this query does not contain opt_values where not a single row in tags exists. If you prefer "0" in the case, use a LEFT JOIN. Caps => keywords (monochrome syntax highlighting).pic.twitter.com/uRqH6lkWhe
1 reply 0 retweets 1 like
Thanks! That code is working great.
And I think I even understand why. ;)
Re Caps: But "count" isn't a keyword, is it? I can create a table with that name.
-
-
Replying to @oe1cxw
Re keywords: Anything can be used as identifier, but you might need to put it under double quotes. SQL makes a distinction between reserved and non-reserverd keywords, where non-reserved keywords can be used without double quotes.
1 reply 0 retweets 1 like -
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.