The table "score" is defined as follows:gid | score-----+-------1 | 70 1 |60 2 | 1003 | 80 3 |50The following query was executed. Select the correct result value. SELECT score FROM score ORDER BY gid DESC, score ASC LIMIT 1;
I think the query is a bit confusing, but the correct answer is definitely E) 100. The order by clause is a bit tricky, but it makes sense once you look at the data.
I'm pretty confident the answer is E) 100. The query is sorting the rows in descending order by gid and then ascending order by score, so the last row with the highest score should be returned.
Okay, let me walk through this step-by-step. The query is selecting the score column, ordering by gid in descending order and then score in ascending order, and limiting to 1 row. I think the answer is B) 60.
The correct answer is E) 100. The query orders the rows by gid in descending order and then by score in ascending order, so the last row with the highest score is returned.
Orville
3 months agoJordan
3 months agoJerry
3 months agoLezlie
3 months agoDevora
4 months agoThad
4 months agoLaurel
4 months agoNorah
5 months agoAshton
5 months agoCammy
5 months agoSylvie
5 months agoCarey
5 months agoShawna
5 months agoJose
6 months agoDaren
6 months agoSalena
6 months agoDorothy
6 months agoJaime
6 months agoElly
6 months agoLaine
7 months agoAyesha
7 months agoEmerson
7 months agoRaylene
7 months agoWerner
8 months agoMarvel
8 months agoJackie
2 months agoLennie
2 months agoHershel
3 months agoWillow
3 months agoFabiola
7 months ago