Contents
Chapter 4 · DatabasePractice

LEARN WITH HARU

Video Lesson တွေက Haru အတန်းသားတွေအတွက်ပါ

Haru ရဲ့ ITPEC FE Full Course မှာ ယခု သင်ခန်းစာတွေကို တစ်ခုချင်း တစ်ကြောင်းချင်း အသေးစိတ်ရှင််ရှင်းပြထားပါတယ်

အခြေခံ မရှိတဲ့ ကျောင်းသားများစွာဟာလည်း ဒီ Course နဲ့ ပဲ အောင်မြင်ကုန်ကြပါပြီ

အတန်းမအပ်သေးပဲ Haru ဆီမှာ အစမ်းသင်ကြည့်ချင်ပါသလား?

သင်တန်းသားတွေရဲ့ စကားသံများ

သင်တန်းသားတွေရဲ့ စကားသံများ

Highlighted text? Practice this concept. Highlighted passages and figures open related questions.

Practice related questions (1)Progress & bookmarks

Current section

2-2-4 Sorting of Data

p. 272

Practice this section 1 linked exam question with default filters

Progress

Not marked complete

Related questions in this lesson 1

Ordering grouped SQL results1
Progress and bookmarks

p. 272

2-2-4 Sorting of Data

Sorting of data refers to rearranging the extraction results in the specified order of a particular attribute. (When there are no sorting instructions, data is extracted in the order in which it is recorded in the original table.) ORDER BY clause is used for sorting data.

Original textbook table, example or syntax box, with its complete original layout. Source text: SELECT Column name 1, Column name 2, ∙∙∙ FROM Table name ORDER BY Column name to be sorted Sorting order • The following two types of sorting orders can be specified. Sorting order Meaning Sort in the ascending order. (This is the default value when ASC sorting order is omitted.) Sort in the descending order. DESC • For records having the same column value, original recording order is generally retained. • The column name to be sorted can also be specified by indicating how many columns from the left it is.
p. 272 · Enlarge

ex18: Sort and extract the “Score” table in the descending order of score.

Original SQL worked example with its complete source code, indentation, punctuation, source frame and any attached original notes. Source text: SELECT * FROM Score ORDER BY Score DESC
p. 272 · Enlarge

ex19: From the “Score” table, determine the highest score for each student and extract in the ascending order.

p. 273

Original SQL worked example with its complete source code, indentation, punctuation, source frame and any attached original notes. Source text: SELECT StudentNumber, MAX(Score) FROM Score GROUP BY StudentNumber ORDER BY 2
p. 273 · Enlarge
Ordering grouped SQL results · 1 practice questions
Side-by-side original sorting outputs: ex18 contains all six Score rows sorted descending by Score; ex19 lists student maxima 6725=60, 6724=85 and 6817=95 in that order. All original result columns and captions remain. Source text: <Execution results of ex18> <Execution results of ex19> Student Subject Student MAX(Score) Score ExaminationDate Number Number Number 6817 K21 95 20XX-10-21 6725 60 6817 K12 90 20XX-10-20 6724 85 6724 K21 85 20XX-10-21 6817 95 6817 K11 85 20XX-10-20 6724 K11 65 20XX-10-20 6725 K21 60 20XX-10-21
p. 273 · Enlarge

Section progress

Original chapter exercises

Original chapter exercises →

New FE Textbook Vol.1 · IT Fundamentals · First Edition, April 2015