Database Queries: Criteria and Sorting – Grade 10 ICT Notes 9.7

© 2026 schoolict.net (Ruwan Mangala Suraweera)

9.7 Database Queries: Criteria and Sortingදත්ත සමුදාය Queries: නිර්ණායක සහ වර්ග කිරීම

G.C.E. O/L Grade 10 ICT · Lesson 9G.C.E. O/L ICT · 10 ශ්‍රේණිය · පාඩම 9

Prints all tabs in the language you are reading. Use “Save as PDF” in the print window to keep a copy.ඔබ කියවන භාෂාවෙන් සියලු tabs මුද්‍රණය වේ. පිටපතක් තියාගන්න print window එකේ “Save as PDF” තෝරන්න.
🎬Video coming soon in this language. Switch language to watch the other video.මේ භාෂාවෙන් වීඩියෝව ඉක්මනින් එනවා. අනෙක් වීඩියෝව බලන්න භාෂාව මාරු කරන්න.

In this videoමේ වීඩියෝවේ

  • A query selects fields and records; Run (!) shows them.Query fields සහ records තෝරයි; Run (!) පෙන්වයි.
  • Criteria operators: = > < >= <= <>.Criteria operators: = > < >= <= <>.
  • Like “A*” and Between 600 And 1000.Like “A*” සහ Between 600 And 1000.
  • AND on the same row; OR on different rows.AND එකම පේළියේ; OR වෙනස් පේළිවල.
  • Sort Ascending or Descending; SQL SELECT is behind it.Ascending හෝ Descending sort; පිටුපස SQL SELECT.
Query DesignCriteriaLikeBetweenANDORDescending

Notesසටහන්

A query asks the database a question, such as ‘Which students scored 75 or more in ICT?’ and shows only the matching records, in the order you want. In this note you will build queries in Query Design (no code needed) by choosing fields, typing criteria with = > < >= <= <>, Like, Between, And/Or, and sorting ascending or descending. Every result below comes from our school database.Query එකක් දත්ත සමුදායෙන් ප්‍රශ්නයක් අසයි, උදා ‘ICT හි 75 හෝ ඊට වැඩි ලකුණු ලැබූ සිසුන් කවුද?’ සහ ගැළපෙන records පමණක් ඔබට අවශ්‍ය පිළිවෙලට පෙන්වයි. මෙම සටහනේ Query Design (කේත අවශ්‍ය නැත) හි fields තෝරා, = > < >= <= <>, Like, Between, And/Or සමඟ criteria type කර, ආරෝහණ හෝ අවරෝහණ ලෙස sort කරමින් queries ගොඩනගමු. පහත සෑම ප්‍රතිඵලයක්ම අපගේ පාසල් දත්ත සමුදායෙනි.

1. Creating a query in Design View1. Design View හි query එකක් සෑදීම

  • Access: Create › Query Design › add tblStudent. Base: Queries › Create Query in Design View.Access: Create › Query Design › tblStudent add කරන්න. Base: Queries › Create Query in Design View.
  • Double-click (or drag) fields into the grid: AdmNo, StudentName, ICTMarks.Fields grid එකට double-click (හෝ drag): AdmNo, StudentName, ICTMarks.
  • Type the condition in the Criteria row; choose Sort; tick/untick Show.Criteria පේළියේ කොන්දේසිය type කරන්න; Sort තෝරන්න; Show tick/untick කරන්න.
  • Click Run (!) to see the result in Datasheet View; save as qryHighICT.ප්‍රතිඵලය Datasheet View හි බැලීමට Run (!) click කරන්න; qryHighICT ලෙස save කරන්න.
tblStudent🔑 AdmNoStudentNameClassIDDateOfBirthICTMarksPrefectField:Table:Sort:Show:Criteria:or:AdmNotblStudent☑StudentNametblStudent☑ICTMarkstblStudentDescending☑>=75Run ! (Datasheet View)AdmNoStudentNameICTMarks24103Nethmi Fernando9124109Sanduni Rajapaksha8824101Amaya Perera8224105Ayesha Fathima774 records match
Figure 9.8: Query Design grid for qryHighICT (ICTMarks >= 75, sorted Descending) and its result.රූපය 9.8: qryHighICT සඳහා Query Design grid (ICTMarks >= 75, Descending) සහ එහි ප්‍රතිඵලය.
Grid rowGrid පේළියMeaningඅර්ථය
FieldFieldThe field to useභාවිත කරන field එක
TableTableTable it comes fromපැමිණෙන table එක
SortSortAscending (A→Z, 0→9) / Descending (Z→A, 9→0)Ascending (A→Z, 0→9) / Descending (Z→A, 9→0)
ShowShowTick to display the field in the resultප්‍රතිඵලයේ පෙන්වීමට tick
CriteriaCriteriaCondition records must meetRecords සපුරාලිය යුතු කොන්දේසිය
ororAn alternative condition (OR)විකල්ප කොන්දේසියක් (OR)

2. Comparison operators2. සංසන්දන operators

OperatorOperatorMeaningඅර්ථයExampleඋදාහරණය
==equal toසමාන“10A” (text in quotes)“10A” (text in quotes)
>>greater thanවැඩි>70>70
<<less thanඅඩු<50<50
>=>=greater than or equalවැඩි හෝ සමාන>=75>=75
<=<=less than or equalඅඩු හෝ සමාන<=1000<=1000
<><>not equalඅසමාන<>“Novel”<>“Novel”

Query qryHighICT – criteria ICTMarks >=75, sorted Descending: 4 students.qryHighICT query – criteria ICTMarks >=75, Descending: සිසුන් 4.

AdmNoAdmNoStudentNameStudentNameICTMarksICTMarks
2410324103Nethmi FernandoNethmi Fernando9191
2410924109Sanduni RajapakshaSanduni Rajapaksha8888
2410124101Amaya PereraAmaya Perera8282
2410524105Ayesha FathimaAyesha Fathima7777

Query qry10A – criteria ClassID “10A”, sorted by StudentName Ascending: 4 students (Amaya Perera, Arun Kumar, Kavindu Silva, Sanduni Rajapaksha).qry10A query – criteria ClassID “10A”, StudentName අනුව Ascending: සිසුන් 4 (Amaya Perera, Arun Kumar, Kavindu Silva, Sanduni Rajapaksha).

StudentNameStudentNameClassIDClassIDICTMarksICTMarks
Amaya PereraAmaya Perera10A10A8282
Arun KumarArun Kumar10A10A5555
Kavindu SilvaKavindu Silva10A10A6464
Sanduni RajapakshaSanduni Rajapaksha10A10A8888

Query qryFail – ICTMarks <50, sorted Ascending: Tharindu Bandara, Ashen Jayasinghe.qryFail query – ICTMarks <50, Ascending: Tharindu Bandara, Ashen Jayasinghe.

StudentNameStudentNameICTMarksICTMarks
Tharindu BandaraTharindu Bandara3939
Ashen JayasingheAshen Jayasinghe4848

Text and dates: text goes in quotes (“10A”); Access dates go between # (<#2010-06-01#). Query qryBorn finds 4 students born before 1 June 2010.පෙළ සහ දින: පෙළ උද්ධෘතවල (“10A”); Access දින # අතර (<#2010-06-01#). qryBorn query මගින් 2010 ජූනි 1 ට පෙර උපන් සිසුන් 4 ක් සොයයි.

StudentNameStudentNameDateOfBirthDateOfBirth
Nethmi FernandoNethmi Fernando25/01/201025/01/2010
Dilini WickramasingheDilini Wickramasinghe11/02/201011/02/2010
Amaya PereraAmaya Perera14/03/201014/03/2010
Ayesha FathimaAyesha Fathima30/05/201030/05/2010

3. Like and Between3. Like සහ Between

Like “A*” finds names starting with A (* = any characters, ? = one character). Result (4): Amaya Perera, Arun Kumar, Ashen Jayasinghe, Ayesha Fathima.Like “A*” A න් ආරම්භ වන නම් සොයයි (* = ඕනෑම අක්ෂර, ? = එක් අක්ෂරයක්). ප්‍රතිඵලය (4): Amaya Perera, Arun Kumar, Ashen Jayasinghe, Ayesha Fathima.

AdmNoAdmNoStudentNameStudentName
2410124101Amaya PereraAmaya Perera
2410624106Arun KumarArun Kumar
2410424104Ashen JayasingheAshen Jayasinghe
2410524105Ayesha FathimaAyesha Fathima

Between 600 And 1000 on Price includes both ends (600 and 1000). 4 books, sorted by Price Ascending:Price මත Between 600 And 1000 අන්ත දෙකම ඇතුළත් (600 සහ 1000). පොත් 4 ක්, Price Ascending:

BookIDBookIDTitleTitlePricePrice
B005B005Amba YaluwoAmba Yaluwo600600
B001B001Madol DoovaMadol Doova750750
B002B002GamperaliyaGamperaliya950950
B008B008Atlas of AsiaAtlas of Asia990990

4. And / Or4. And / Or

1
AND – same Criteria rowAND – එකම Criteria පේළිය
Both must be true: ClassID “10B” AND ICTMarks >70 → Nethmi Fernando, Ayesha Fathima (2).දෙකම සත්‍ය විය යුතුය: ClassID “10B” AND ICTMarks >70 → Nethmi Fernando, Ayesha Fathima (2).
2
OR – different rowsOR – වෙනස් පේළි
Either may be true: ClassID “10C” on Criteria, Prefect Yes on the ‘or’ row → 5 students.එකක් සත්‍ය වුවද ප්‍රමාණවත්: Criteria හි ClassID “10C”, ‘or’ පේළියේ Prefect Yes → සිසුන් 5.
StudentNameStudentNameClassIDClassIDICTMarksICTMarks
Nethmi FernandoNethmi Fernando10B10B9191
Ayesha FathimaAyesha Fathima10B10B7777
StudentNameStudentNameClassIDClassIDPrefectPrefect
Amaya PereraAmaya Perera10A10AYesYes
Ashen JayasingheAshen Jayasinghe10C10CNoNo
Dilini WickramasingheDilini Wickramasinghe10C10CYesYes
Malith HerathMalith Herath10C10CNoNo
Nethmi FernandoNethmi Fernando10B10BYesYes

Not equal: Category <>“Novel” gives 5 books.අසමාන: Category <>“Novel” පොත් 5 ක් දෙයි.

TitleTitleCategoryCategory
Atlas of AsiaAtlas of AsiaReferenceReference
Birds of Sri LankaBirds of Sri LankaScienceScience
Python for BeginnersPython for BeginnersComputingComputing
Sri Lanka School AtlasSri Lanka School AtlasReferenceReference
The Story of SigiriyaThe Story of SigiriyaHistoryHistory

Yes/No criteria: Returned = No lists the books not yet returned (4 loans).Yes/No criteria: Returned = No තවම ආපසු නොදුන් පොත් ලැයිස්තු කරයි (ණය 4).

BorrowIDBorrowIDBookIDBookIDAdmNoAdmNo
22B005B0052410324103
33B004B0042410124101
55B001B0012410524105
66B006B0062410924109
💡 AND makes a result smaller (both conditions); OR makes it larger (either condition). Always check the result count!AND ප්‍රතිඵලය කුඩා කරයි (කොන්දේසි දෙකම); OR විශාල කරයි (ඕනෑම එකක්). ප්‍රතිඵල ගණන සැමවිටම පරීක්ෂා කරන්න!

5. Extra (not required for O/L): SQL SELECT5. අමතර (O/L සඳහා අවශ්‍ය නැත): SQL SELECT

Behind every Query Design is SQL (Structured Query Language). In Access click View › SQL View to see it:සෑම Query Design එකක් පිටුපසම SQL (Structured Query Language) ඇත. Access හි View › SQL View click කර එය බලන්න:

SQL (extra)SQL (අමතර)Meaningඅර්ථය
SELECT AdmNo, StudentName, ICTMarksSELECT AdmNo, StudentName, ICTMarksfields to showපෙන්වන fields
FROM tblStudentFROM tblStudentthe tabletable එක
WHERE ICTMarks >= 75WHERE ICTMarks >= 75criteriacriteria
ORDER BY ICTMarks DESC;ORDER BY ICTMarks DESC;sort (ASC/DESC)sort (ASC/DESC)
NEW 20262026 නව 2026: ask the data in plain words – then check. Google Sheets, Airtable and Access add-ins with AI assistants can turn ‘show 10B students above 70’ into a query or SQL. AI can misread a condition (> vs >=), so open the Design grid, check the criteria and the record count yourself. Sri Lankan systems like e-channelling run millions of such queries daily (doctor = X AND date = today).2026: සරල වචනවලින් දත්ත අසන්න – පසුව පරීක්ෂා කරන්න. AI සහායකයන් සහිත Google Sheets, Airtable සහ Access add-ins ‘70 ට වැඩි 10B සිසුන් පෙන්වන්න’ query හෝ SQL බවට පත් කළ හැක. AI කොන්දේසියක් වැරදියට කියවිය හැකි නිසා (> vs >=), Design grid විවෘත කර criteria සහ record ගණන ඔබම පරීක්ෂා කරන්න. e-channelling වැනි ශ්‍රී ලාංකික පද්ධති දිනපතා එවැනි queries මිලියන ගණනක් ධාවනය කරයි (doctor = X AND date = today).

Key Wordsප්‍රධාන පද

QueryQuery
A question that selects records and fields from tables.Tables වලින් records සහ fields තෝරන ප්‍රශ්නයක්.
Query DesignQuery Design
Grid view to build a query without code.කේත නොමැතිව query ගොඩනගන grid view එක.
CriteriaCriteria
Conditions that records must meet.Records සපුරාලිය යුතු කොන්දේසි.
Run (!)Run (!)
Button that executes the query.Query එක ක්‍රියාත්මක කරන බොත්තම.
AscendingAscending
Sort A→Z, smallest→largest, oldest→newest.A→Z, කුඩා→විශාල, පැරණි→නව sort.
DescendingDescending
Sort Z→A, largest→smallest.Z→A, විශාල→කුඩා sort.
ShowShow
Grid tick box: display the field in the result.Grid tick box: ප්‍රතිඵලයේ field පෙන්වීම.
LikeLike
Pattern match with wildcards * and ?.* සහ ? wildcards සමඟ රටා ගැළපීම.
Between … And …Between … And …
Range including both ends.අන්ත දෙකම ඇතුළත් පරාසය.
ANDAND
Both conditions true – same Criteria row.කොන්දේසි දෙකම සත්‍ය – එකම Criteria පේළිය.
OROR
Either condition true – different rows.ඕනෑම කොන්දේසියක් සත්‍ය – වෙනස් පේළි.
SQLSQL
Structured Query Language behind queries (extra).Queries පිටුපස Structured Query Language (අමතර).

Sample Q&Aආදර්ශ ප්‍රශ්න සහ පිළිතුරු

1What is a query?Query එකක් යනු කුමක්ද?

Answerපිළිතුර: A request that selects specific fields and records from tables, optionally sorted.Tables වලින් නිශ්චිත fields සහ records තෝරන ඉල්ලීමක්, sort කළ හැක.

2Write criteria for ICT marks 75 or more.ICT ලකුණු 75 හෝ වැඩි සඳහා criteria ලියන්න.

Answerපිළිතුර: >=75>=75

3Write criteria for names starting with A.A න් ආරම්භ වන නම් සඳහා criteria ලියන්න.

Answerපිළිතුර: Like “A*”Like “A*”

4How is AND entered in the grid?Grid එකේ AND ඇතුළත් කරන්නේ කෙසේද?

Answerපිළිතුර: Both conditions on the same Criteria row.කොන්දේසි දෙකම එකම Criteria පේළියේ.

5How is OR entered?OR ඇතුළත් කරන්නේ කෙසේද?

Answerපිළිතුර: Conditions on different rows (Criteria and ‘or’).කොන්දේසි වෙනස් පේළිවල (Criteria සහ ‘or’).

6What does unticking Show do?Show untick කිරීමෙන් කුමක් වේද?

Answerපිළිතුර: The field is used for criteria/sort but not displayed.Field එක criteria/sort සඳහා භාවිත වුවද නොපෙන්වයි.

MCQබහුවරණ ප්‍රශ්න

Choose the correct answer for each question.සෑම ප්‍රශ්නයකටම නිවැරදි පිළිතුර තෝරන්න.

Scoreලකුණු: 0 / 15

1A query that lists ICTMarks >= 75 from tblStudent returns how many records?tblStudent න් ICTMarks >= 75 ලැයිස්තු කරන query එක records කීයක් දෙයිද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

Nethmi Fernando, Sanduni Rajapaksha, Amaya Perera, Ayesha Fathima.Nethmi Fernando, Sanduni Rajapaksha, Amaya Perera, Ayesha Fathima.

2In qryHighICT sorted Descending, the first student is…Descending sort කළ qryHighICT හි පළමු සිසුවා…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

Highest first.ඉහළම පළමුව.

3Criteria for marks less than 50 is…50 ට අඩු ලකුණු සඳහා criteria…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

Less than.අඩු.

4qryFail (ICTMarks <50, Ascending) lists…qryFail (ICTMarks <50, Ascending) ලැයිස්තු කරන්නේ…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

Ascending: lowest first.Ascending: අඩුම පළමුව.

5The operator meaning ‘not equal to’ is…‘අසමාන’ අර්ථය ඇති operator එක…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

Access uses <>.Access <> භාවිත කරයි.

6Like “A*” on StudentName returns how many students?StudentName මත Like “A*” සිසුන් කීයක් දෙයිද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

Amaya Perera, Arun Kumar, Ashen Jayasinghe, Ayesha FathimaAmaya Perera, Arun Kumar, Ashen Jayasinghe, Ayesha Fathima

7In Like, the wildcard for any number of characters is…Like හි ඕනෑම අක්ෂර ගණනකට wildcard එක…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

Star.තරුව.

8Price Between 600 And 1000 – is a book of Rs. 600 included?Price Between 600 And 1000 – රු. 600 පොතක් ඇතුළත්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

Amba Yaluwo Rs. 600 is in the result.Amba Yaluwo රු. 600 ප්‍රතිඵලයේ ඇත.

9ClassID “10B” AND ICTMarks >70 gives…ClassID “10B” AND ICTMarks >70 දෙන්නේ…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

Tharindu has 39.Tharindu ට 39.

10To combine conditions with AND in Query Design, type them…Query Design හි AND සමඟ කොන්දේසි ඒකාබද්ධ කිරීමට type කරන්නේ…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

Same row.එකම පේළිය.

11ClassID “10C” OR Prefect = Yes returns how many students?ClassID “10C” OR Prefect = Yes සිසුන් කීයක් දෙයිද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

Amaya Perera, Ashen Jayasinghe, Dilini Wickramasinghe, Malith Herath, Nethmi FernandoAmaya Perera, Ashen Jayasinghe, Dilini Wickramasinghe, Malith Herath, Nethmi Fernando

12Sorting names Z → A is…නම් Z → A sort කිරීම…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

Descending.Descending.

13To use a field for criteria but hide it from the result, you…Field එකක් criteria සඳහා භාවිත කර ප්‍රතිඵලයෙන් සැඟවීමට…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

Show box.Show box.

14Returned = No on tblBorrow lists how many loans?tblBorrow මත Returned = No ණය කීයක් ලැයිස්තු කරයිද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

Not yet returned.තවම ආපසු නොදුන්.

15(SQL extra) In SELECT … FROM tblStudent WHERE ICTMarks >= 75 ORDER BY ICTMarks DESC, the criteria part is…(SQL අමතර) SELECT … FROM tblStudent WHERE ICTMarks >= 75 ORDER BY ICTMarks DESC හි criteria කොටස…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

WHERE.WHERE.

MCQ answer keyMCQ පිළිතුරු

  1. A – Nethmi Fernando, Sanduni Rajapaksha, Amaya Perera, Ayesha Fathima.Nethmi Fernando, Sanduni Rajapaksha, Amaya Perera, Ayesha Fathima.
  2. D – Highest first.ඉහළම පළමුව.
  3. B – Less than.අඩු.
  4. C – Ascending: lowest first.Ascending: අඩුම පළමුව.
  5. A – Access uses <>.Access <> භාවිත කරයි.
  6. B – Amaya Perera, Arun Kumar, Ashen Jayasinghe, Ayesha FathimaAmaya Perera, Arun Kumar, Ashen Jayasinghe, Ayesha Fathima
  7. C – Star.තරුව.
  8. D – Amba Yaluwo Rs. 600 is in the result.Amba Yaluwo රු. 600 ප්‍රතිඵලයේ ඇත.
  9. A – Tharindu has 39.Tharindu ට 39.
  10. A – Same row.එකම පේළිය.
  11. C – Amaya Perera, Ashen Jayasinghe, Dilini Wickramasinghe, Malith Herath, Nethmi FernandoAmaya Perera, Ashen Jayasinghe, Dilini Wickramasinghe, Malith Herath, Nethmi Fernando
  12. C – Descending.Descending.
  13. B – Show box.Show box.
  14. D – Not yet returned.තවම ආපසු නොදුන්.
  15. B – WHERE.WHERE.

Structured Questionsව්‍යුහගත ප්‍රශ්න

1Using the query grid in Figure 9.8: (i) name the table, (ii) give the criteria, (iii) state the sort order, (iv) write the result. (4 marks)රූපය 9.8 query grid භාවිතයෙන්: (i) table නම, (ii) criteria, (iii) sort පිළිවෙල, (iv) ප්‍රතිඵලය ලියන්න. (ලකුණු 4) (4 marksලකුණු 4)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
(i) tblStudent (ii) ICTMarks >=75 (iii) ICTMarks Descending (iv) Nethmi Fernando, Sanduni Rajapaksha, Amaya Perera, Ayesha Fathima.(i) tblStudent (ii) ICTMarks >=75 (iii) ICTMarks Descending (iv) Nethmi Fernando, Sanduni Rajapaksha, Amaya Perera, Ayesha Fathima.
tblStudent🔑 AdmNoStudentNameClassIDDateOfBirthICTMarksPrefectField:Table:Sort:Show:Criteria:or:AdmNotblStudent☑StudentNametblStudent☑ICTMarkstblStudentDescending☑>=75Run ! (Datasheet View)AdmNoStudentNameICTMarks24103Nethmi Fernando9124109Sanduni Rajapaksha8824101Amaya Perera8224105Ayesha Fathima774 records match
Model answerආදර්ශ පිළිතුර

2Write the criteria for: (i) class 10A, (ii) names beginning with A, (iii) price from 600 to 1000, (iv) category not Novel. (4 marks)Criteria ලියන්න: (i) 10A පන්තිය, (ii) A න් ආරම්භ වන නම්, (iii) මිල 600 සිට 1000, (iv) Novel නොවන කාණ්ඩය. (ලකුණු 4) (4 marksලකුණු 4)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
(i) “10A” (ii) Like “A*” (iii) Between 600 And 1000 (iv) <>“Novel”(i) “10A” (ii) Like “A*” (iii) Between 600 And 1000 (iv) <>“Novel”

3Find the 10B students with ICTMarks >70. Show how AND is entered and give the result. (3 marks)ICTMarks >70 ඇති 10B සිසුන් සොයන්න. AND ඇතුළත් කරන ආකාරය සහ ප්‍රතිඵලය දෙන්න. (ලකුණු 3) (3 marksලකුණු 3)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
ClassID criteria “10B” and ICTMarks criteria >70 on the same row. Result: Nethmi Fernando, Ayesha Fathima.ClassID criteria “10B” සහ ICTMarks criteria >70 එකම පේළියේ. ප්‍රතිඵලය: Nethmi Fernando, Ayesha Fathima.

4Explain the difference between AND and OR criteria with an example. (2 marks)උදාහරණයක් සමඟ AND සහ OR criteria අතර වෙනස පැහැදිලි කරන්න. (ලකුණු 2) (2 marksලකුණු 2)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
AND – both true, same row (10B AND >70 → 2); OR – either true, different rows (10C OR Prefect → 5).AND – දෙකම සත්‍ය, එකම පේළිය (10B AND >70 → 2); OR – ඕනෑම එකක්, වෙනස් පේළි (10C OR Prefect → 5).

5List the students with ICTMarks <50 sorted Ascending, and suggest one use of this query for the teacher. (2 marks)ICTMarks <50 ඇති සිසුන් Ascending ලෙස ලැයිස්තු කර, ගුරුවරයාට මෙම query එකේ එක් භාවිතයක් යෝජනා කරන්න. (ලකුණු 2) (2 marksලකුණු 2)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
Tharindu Bandara, Ashen Jayasinghe; to arrange extra classes for them.Tharindu Bandara, Ashen Jayasinghe; ඔවුන්ට අමතර පන්ති සංවිධානය කිරීමට.

🎮 Game🎮 ක්‍රීඩා

Pick a game. Each one uses words from this lesson.ක්‍රීඩාවක් තෝරන්න. හැම එකක්ම මේ පාඩමේ වචන පාවිච්චි කරනවා.

Summary & Downloadsසාරාංශය සහ බාගත කිරීම්

Key pointsප්‍රධාන කරුණු

  • A query selects fields and records; Run (!) shows the result.Query fields සහ records තෝරයි; Run (!) ප්‍රතිඵලය පෙන්වයි.
  • Grid rows: Field, Table, Sort, Show, Criteria, or.Grid පේළි: Field, Table, Sort, Show, Criteria, or.
  • Operators: = > < >= <= <>.Operators: = > < >= <= <>.
  • Text in quotes "10A"; dates in #…#.පෙළ උද්ධෘතවල "10A"; දින #…# අතර.
  • Like "A*": * any characters, ? one.Like "A*": * ඕනෑම අක්ෂර, ? එකක්.
  • Between 600 And 1000 includes both ends.Between 600 And 1000 අන්ත දෙකම ඇතුළත්.
  • AND same row (fewer); OR different rows (more).AND එකම පේළිය (අඩු); OR වෙනස් පේළි (වැඩි).
  • Sort Ascending/Descending; SQL SELECT is behind it (extra).Ascending/Descending sort; පිටුපස SQL SELECT (අමතර).

Downloadsබාගත කිරීම්

Full Lesson 9 PDFසම්පූර්ණ පාඩම 9 PDF: English · සිංහල

Next noteඊළඟ සටහන 9.8 →

© 2026 schoolict.net (Ruwan Mangala Suraweera). All rights reserved.සියලු හිමිකම් ඇවිරිණි.