Knoppie [2.1.1 - Lys van rose]
Vertoon die besonderhede van die plante in die Roos-kategorie in die tblPlante-tabel - NSC Information Technology - Question 2 - 2019 - Paper 1
Question 2
Knoppie [2.1.1 - Lys van rose]
Vertoon die besonderhede van die plante in die Roos-kategorie in die tblPlante-tabel.
Voorbeeld van afvoer van die eerste vyf rekord... show full transcript
Worked Solution & Example Answer:Knoppie [2.1.1 - Lys van rose]
Vertoon die besonderhede van die plante in die Roos-kategorie in die tblPlante-tabel - NSC Information Technology - Question 2 - 2019 - Paper 1
Step 1
Knoppie [2.1.1 - Lys van rose]
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To obtain the details of plants in the Rose category from the tblPlante table, the SQL query to use is:
SELECT * FROM tblPlante WHERE Kategory = 'Roos';
This query selects all fields from the table where the category ('Kategory') is equivalent to 'Roos'.
Step 2
Knoppie [2.1.2 - Pienk rose en blomme]
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To display the [PlantKode-, Kategory-, Kleur- en GrootteVanPot-velde] for all plants in the Blom and Roos categories that have a pink color, the following SQL query is applied:
SELECT PlantKode, Kategory, Kleur, GrootteVanPot
FROM tblPlante
WHERE (Kategory IN ('ROOS', 'BLOM')) AND Kleur LIKE '%Pienk%';
Step 3
Knoppie [2.1.3 - Gemiddelde prys per kategorie]
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To determine the average price of plants per category from the tblPlante table, the following SQL query should be executed:
SELECT Kategore, FORMAT(AVG(Prys), 'Currency') AS [GemiddeldePrys]
FROM tblPlante
GROUP BY Kategore;
Step 4
Knoppie [2.1.4 - Vertoon inligting vir faktuurnommer F2]
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
In order to display the FaktuurNom-, Beskrywing- and GetalBestel fields from the tblBestellings table for invoice number F2, use the following SQL query:
SELECT FaktuurNom, Beskrywing, GetalBestel
FROM tblBestellings
WHERE plantkode = 'DIP002#M' AND FaktuurNom = 'F2';
Step 5
Knoppie [2.1.5 - Dater item wat afgevoer is op]
97%
117 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To update the delivery count in tblBestellings, the following SQL command should be executed:
UPDATE tblBestellings SET GetalAfgelewer = GetalBestel WHERE ItemNom = 'Quoted(ItemNom)';
Step 6
Knoppie [2.2.2 - Plaas 'n bestelling]
97%
121 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To place an order in the tblBestellings table it is necessary to use the following information:
The invoice number is F2.
The plantcode is 'DIP002#M'.
The delivery count is set to 125.
The specific SQL command could look like this:
INSERT INTO tblBestellings (FaktuurNom, Plantkode, GetalBestel)
VALUES ('F2', 'DIP002#M', 125);