- My Forums
- Tiger Rant
- LSU Recruiting
- SEC Rant
- Saints Talk
- Pelicans Talk
- More Sports Board
- Fantasy Sports
- Golf Board
- Soccer Board
- O-T Lounge
- Tech Board
- Home/Garden Board
- Outdoor Board
- Health/Fitness Board
- Movie/TV Board
- Book Board
- Music Board
- Political Talk
- Money Talk
- Fark Board
- Gaming Board
- Travel Board
- Food/Drink Board
- Ticket Exchange
- TD Help Board
Customize My Forums- View All Forums
- Show Left Links
- Topic Sort Options
- Trending Topics
- Recent Topics
- Active Topics
Started By
Message
re: A request of the tigerdroppings DBAs
Posted on 3/18/18 at 4:07 pm to PsychTiger
Posted on 3/18/18 at 4:07 pm to PsychTiger
I have a feeling he is represented well in top 5 downvoted
Posted on 3/18/18 at 4:08 pm to vuvuzela
Any calculations that don’t have him as the clear #1 are inherently flawed.
Posted on 3/18/18 at 4:15 pm to vuvuzela
How about a single post?
Got to be hammer time
Got to be hammer time
Posted on 3/18/18 at 4:21 pm to White Roach
quote:
Hammertime's "Check His Knuckles First" thread had over 1,200 downvotes. It occasionally gets bumped, so new downvoters can add to the tally.
A truly amazing thread. Last time it was bumped I think it had about 2400 downvotes.
Posted on 3/18/18 at 4:31 pm to tigercross
quote:
This would return the top 5 most upvoted and downvoted posters. OP asked for most upvoted and downvoted POSTS.
SELECT u.id, u.username, p.id, SUM(p.downvotes) as total
FROM users u
LEFT JOIN posts p
ON p.user_id = u.id
GROUP BY p.id
ORDER BY total DESC
LIMIT 5
Posted on 3/18/18 at 5:53 pm to DarthRebel
quote:
SELECT TOP 5 Poster, COUNT(*) as CNT
FROM VoteTable
WHERE VoteType = 'UP'
GROUP BY Poster
ORDER BY 2 DESC
Sigh. With all the bad grammar on this board I'll have to call you out on this too. Since "TOP 5" is a SQL Server construct I'll assume you aren't using Oracle.
That said, it's bad form to write this:
quote:
ORDER BY 2
Instead, explicitly name the column;
quote:
ORDER BY COUNT(*)
This improves readability plus it removes the possibility of miscounting the column number.
Posted on 3/18/18 at 9:00 pm to foshizzle
I'd love to run some queries against this database.
1. User submitting most upvotes
2. User submitting most down votes
3. Oldest currently active member
4. User who misspells ridiculous most frequently
5. Etc.
1. User submitting most upvotes
2. User submitting most down votes
3. Oldest currently active member
4. User who misspells ridiculous most frequently
5. Etc.
Posted on 3/18/18 at 9:25 pm to Godfather1
“Johnny Jones is not the problem” thread on the rant got over 500 in a little over an hour.
Posted on 3/18/18 at 9:30 pm to tigercross
This
would be more interesting than this
quote:
would return the top 5 most upvoted and downvoted posters.
would be more interesting than this
quote:
OP asked for most upvoted and downvoted POSTS.
Posted on 3/18/18 at 9:33 pm to DarthRebel
quote:
SELECT TOP 5 Poster, COUNT(*) as CNT
FROM VoteTable
WHERE VoteType = 'UP'
GROUP BY Poster
ORDER BY 2 DESC
You probably will have to incorporate some table joins baw. Surely TDs database isn't that flat.
Posted on 3/18/18 at 9:38 pm to fallguy_1978
quote:
You probably will have to incorporate some table joins baw. Surely TDs database isn't that flat.
Votes seem to be a CSS feature and probably aren’t stored anyway, so this is just a thought exercise. Which the poster you quoted did not pass.
Posted on 3/18/18 at 10:06 pm to fallguy_1978
quote:
You probably will have to incorporate some table joins baw. Surely TDs database isn't that flat.
Have you seen how slow this place runs sometimes
Posted on 3/18/18 at 10:10 pm to DarthRebel
It's one big jsonb field
Posted on 3/18/18 at 10:14 pm to DarthRebel
quote:
Have you seen how slow this place runs sometimes
Chicken probably needs to do an index evaluation or invest in an all flash array
Posted on 3/19/18 at 8:50 am to fallguy_1978
quote:
Chicken probably needs to do an index evaluation or invest in an all flash array
It's almost certainly some VM's behind AWS or Azure.
Popular
Back to top
Follow TigerDroppings for LSU Football News