Skip to main content
Commonmark migration
Source Link

This query looks very nice and clean. I can't see any obvious or glaring issues here, I do have some ideas for improvement though:

###Naming

Naming

a, u, q and p are not all that "expressive" aliases. There is no need to shorten these aliases to be incomprehensible for people outside the SE-System, that don't understand how Posts a is different from Posts q

###Select X

Select X

How about also making the number of results variable?

SELECT TOP ##topX:int?100##

allows the user to decide how many results they want.

###CTE's

CTE's

Last time I checked, Data Explorer supported CTE's. Make use of them:

WITH Zombies AS (
     SELECT q.Id ZombieId, MAX(a.Score) MaxAnswerScore
     -- ...
)

SELECT ##topX:int?100## FROM Zombies

This query looks very nice and clean. I can't see any obvious or glaring issues here, I do have some ideas for improvement though:

###Naming

a, u, q and p are not all that "expressive" aliases. There is no need to shorten these aliases to be incomprehensible for people outside the SE-System, that don't understand how Posts a is different from Posts q

###Select X

How about also making the number of results variable?

SELECT TOP ##topX:int?100##

allows the user to decide how many results they want.

###CTE's

Last time I checked, Data Explorer supported CTE's. Make use of them:

WITH Zombies AS (
     SELECT q.Id ZombieId, MAX(a.Score) MaxAnswerScore
     -- ...
)

SELECT ##topX:int?100## FROM Zombies

This query looks very nice and clean. I can't see any obvious or glaring issues here, I do have some ideas for improvement though:

Naming

a, u, q and p are not all that "expressive" aliases. There is no need to shorten these aliases to be incomprehensible for people outside the SE-System, that don't understand how Posts a is different from Posts q

Select X

How about also making the number of results variable?

SELECT TOP ##topX:int?100##

allows the user to decide how many results they want.

CTE's

Last time I checked, Data Explorer supported CTE's. Make use of them:

WITH Zombies AS (
     SELECT q.Id ZombieId, MAX(a.Score) MaxAnswerScore
     -- ...
)

SELECT ##topX:int?100## FROM Zombies
whoopsie
Source Link
Vogel612
  • 25.3k
  • 7
  • 58
  • 141

This query looks very nice and clean. I can't see any obvious or glaring issues here, I do have some ideas for improvement though:

###Naming

a, u, q and p are not all that "expressive" aliases. There is no need to shorten these aliases to be incomprehensible for people outside the SE-System, that don't understand how Posts a is different from Posts q

###Select X

How about also making the number of results variable?

SELECT TOP ##topX:int?100##

allows the user to decide how many results they want.

###CTE's

Last time I checked, Data Explorer supported CTE's. Make use of them:

WITH Zombies AS (
     SELECT q.Id ZombieId, MAX(a.Score) MaxAnswerScore
     -- ...
)

SELECT ##topX:int?100## FROM Zombies

This query looks very nice and clean. I can't see any obvious or glaring issues here, I do have some ideas for improvement though:

###Naming

a, u, q and p are not all that "expressive" aliases. There is no need to shorten these aliases to be incomprehensible for people outside the SE-System, that don't understand how Posts a is different from Posts q

###Select X

How about also making the number of results variable?

SELECT ##topX:int?100##

allows the user to decide how many results they want.

###CTE's

Last time I checked, Data Explorer supported CTE's. Make use of them:

WITH Zombies AS (
     SELECT q.Id ZombieId, MAX(a.Score) MaxAnswerScore
     -- ...
)

SELECT ##topX:int?100## FROM Zombies

This query looks very nice and clean. I can't see any obvious or glaring issues here, I do have some ideas for improvement though:

###Naming

a, u, q and p are not all that "expressive" aliases. There is no need to shorten these aliases to be incomprehensible for people outside the SE-System, that don't understand how Posts a is different from Posts q

###Select X

How about also making the number of results variable?

SELECT TOP ##topX:int?100##

allows the user to decide how many results they want.

###CTE's

Last time I checked, Data Explorer supported CTE's. Make use of them:

WITH Zombies AS (
     SELECT q.Id ZombieId, MAX(a.Score) MaxAnswerScore
     -- ...
)

SELECT ##topX:int?100## FROM Zombies
Source Link
Vogel612
  • 25.3k
  • 7
  • 58
  • 141

This query looks very nice and clean. I can't see any obvious or glaring issues here, I do have some ideas for improvement though:

###Naming

a, u, q and p are not all that "expressive" aliases. There is no need to shorten these aliases to be incomprehensible for people outside the SE-System, that don't understand how Posts a is different from Posts q

###Select X

How about also making the number of results variable?

SELECT ##topX:int?100##

allows the user to decide how many results they want.

###CTE's

Last time I checked, Data Explorer supported CTE's. Make use of them:

WITH Zombies AS (
     SELECT q.Id ZombieId, MAX(a.Score) MaxAnswerScore
     -- ...
)

SELECT ##topX:int?100## FROM Zombies