Κουίζ που συνδέεται με οδηγό · Μεσαίο Επίπεδο
Πώς να γράψετε συναρτήσεις παραθύρου SQL με το AI Quiz
Ελέγξτε τα διαμερίσματα παραθύρων SQL, τους δεσμούς κατάταξης και τα πλαίσια εκτέλεσης συνολικά με παραδείγματα αγορών, ημερομηνίες που λείπουν και επιλογή τελευταίας εκδήλωσης.
Ερώτηση 1 του 8
Για παραγγελθείσες αγορές των 5, 7 και 4, ποια τρέχοντα σύνολα σειράς-σειρά ταιριάζουν με το πλαίσιο του οδηγού;
Προεπισκόπηση κάθε ερώτησης8 ερωτήσεις
Οι απαντήσεις και οι εξηγήσεις εμφανίζονται καθώς κάνετε το κουίζ.
- Για παραγγελθείσες αγορές των 5, 7 και 4, ποια τρέχοντα σύνολα σειράς-σειρά ταιριάζουν με το πλαίσιο του οδηγού;
- 5, 7 and 4
- 5, 12 and 16
- 16, 16 and 16
- 5, 14 and 12
- Για τις φθίνουσες βαθμολογίες 100, 100 και 90, ποια ακολουθία παράγει το RANK;
- 1, 2 and 3
- 1, 1 and 2
- 2, 2 and 3
- 1, 1 and 3
- Ποια συνάρτηση δίνει ισόπαλες βαθμολογίες 100, 100 και 90 τις τάξεις 1, 1 και 2;
- DENSE_RANK
- ROW_NUMBER
- RANK
- LAG
- Ένα ερώτημα τελευταίου συμβάντος χρησιμοποιεί ROW_NUMBER που ταξινομείται μόνο με χρονική σήμανση που μοιράζεται δύο συμβάντα. Τι χρειάζεται για μια προβλέψιμη επιλογή μεταξύ τους;
- Remove the account partition
- Replace the final result with an unqualified DISTINCT
- Add an appropriate tie-breaker to the window ordering
- Assume insertion order resolves every tie
- Γιατί μπορεί η ΟΤΔ ημερήσιων πωλήσεων να μην αντιπροσωπεύει τις χθεσινές πωλήσεις;
- LAG always refers to the first row of the entire table
- The previous recorded row may be separated by missing dates
- LAG automatically groups all dates in one month
- The function replaces missing dates with zero
- An ORDER BY appears inside OVER. What is still needed if the final displayed result must have a specified order?
- Only a PARTITION BY with the same column
- Only a ROWS frame using the same ordering column
- No further clause because window ordering guarantees display order
- A final ORDER BY for the query result
- Why should a tie-breaker not be added indiscriminately to RANK when equal scores should share a rank?
- It can change which rows are peers and therefore change tied ranks
- It leaves peer membership unchanged because only the first ordering column matters
- It changes only the final display order and never the window calculation
- It preserves equal-score ranks while automatically making their row numbers predictable
- In PostgreSQL, how can a query filter rows using a window value calculated in an inner SELECT?
- Use that value in the same SELECT's WHERE without another query level
- Replace OVER with GROUP BY in every case
- Filter in an outer query or common table expression
- Assume every database supports an identical QUALIFY clause