Maak voor deze assignments gebruik van de online database op W3 schools. Voeg daarna je queries toe aan een (tekst)bestand en stuur dit door. Vergeet niet om boven elke query een comment te plaatsen met de opgave.
Selecteer alle klanten die in Duitsland of Londen wonen. Sorteer oplopend op naam.
Haal alle producten op die minder dan 40$ kosten.
Breidt bovenstaande query uit door ook de naam en beschrijving van de productcategorie te tonen.
Sorteer op prijs, van duur naar goedkoop.
Voeg jezelf toe als klant (Adres mag vals zijn)
Voeg enkele orders toe op jouw naam.
Toon alle klanten die ‘Carlos’ heten.
Pas de ShipperName van United Package aan naar United Packages International.
Zorg ervoor dat enkel 1 record aangepast kan worden.
Haal alle orders op van 1997. Toon ook de CustomerName, ContactName, Country van de klant en de voor-en achternaam van de verkoper, alsook de SuplierName van de leverancier.
De kolom Country is generiek. Een derde partij weet niet of het over het land van de klant, verkoper of leverancier gaat. Geef deze kolom weer als ‘CustomerCountry’.
Toon alle klanten die minstens 1 bestelling geplaatst hebben (Tip: Inner Join)
Toon alle klanten die nog geen bestellingen geplaatst hebben. (Tip: Outer Join)
Haal de top 5 klanten op die de meeste bestellingen geplaatst hebben. Rangschik van hoog naar laag.
Filter bovenstaande query door enkel de klanten te tonen met een totaal aantal producten <= 100
Haal de top 3 bestellingen op met het hoogst aantal producten. Toon het ordernummer en het aantal producten in die bestelling. Noem deze kolom ‘Nr. of Products’.
Breidt bovenstaande query uit door ook het land, ID en de naam van de klant weer te geven.
Breidt bovenstaande query uit door enkel de bestellingen te tonen die niet in de USA of Oostenrijk plaatsvonden.
Filter bovenstaande query door enkel de bestellingen te tonen met een totaal aantal producten <= 150
Nota: Het kan zijn dat het TOP x commando fouten geeft. Geef dan maar een seintje.
We gebruiken cookies op onze website om u de meest relevante ervaring te bieden door uw voorkeuren en herhaalde bezoeken te onthouden. Door op "Alles accepteren" te klikken, stemt u in met het gebruik van ALLE cookies. U kunt echter "Cookie-instellingen" bezoeken om een ​​gecontroleerde toestemming te geven.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duur
Omschrijving
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.