Einführung in SQL mit KI
Jasmin Ludolf
Senior Data Science Content Developer
$$
SELECT: was anzeigenFROM: wo suchenAbfrage:
SELECT product_name
FROM products;
Ergebnis:
|product_name|
|------------|
| Laptop |
| Desktop |
| Gaming |
...
Aufforderung: Was sind die Produktnamen?
SELECT product_name
FROM products;
|product_name|
|------------|
| Laptop |
| Desktop |
| Gaming |
...
Aufforderung: Zeig das Feld product_name aus der Produkttabelle
SELECT product_name
FROM products;
|product_name|
|------------|
| Laptop |
| Desktop |
| Gaming |
...
Aufforderung: Zeig mir alles aus der Produkttabelle
SELECT product_id, product_name, category, unit_price, unit_cost
FROM product;
|product_id|product_name|category |unit_price|unit_cost|
|----------|------------|---------|----------|---------|
|100 |Laptop |Computing|649.99 |420 |
|101 |Desktop |Computing|749.99 |480 |
|102 |Gaming |Computing|1099.99 |800 |
|103 |Mouse |Computing|19.99 |8 |
...
Aufforderung: Zeig mir alles aus der Produkttabelle
SELECT *
FROM product;
|product_id|product_name|category |unit_price|unit_cost|
|----------|------------|---------|----------|---------|
|100 |Laptop |Computing|649.99 |420 |
|101 |Desktop |Computing|749.99 |480 |
|102 |Gaming |Computing|1099.99 |800 |
|103 |Mouse |Computing|19.99 |8 |
...
* Platzhalter: "alles auswählen"* für schnelle ErkundungAufforderung: Zeig den Namen und die Kategorie für jedes Produkt
SELECT product_name, category
FROM products;
|product_name|category |
|------------|---------|
| Laptop |Computing|
| Desktop |Computing|
| Gaming |Computing|
...
$$

Einführung in SQL mit KI