Ces questions permettent de vous situer vis à vis de la programmation et de l'informatique en général. Il est normal de ne pas tout connaître ;)
SELECT Marque, AVG(Prix)
FROM Produits
GROUP BY Marque
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
Source: https://medium.com/@Mahmoud_Zalt/eloquent-relationships-cheat-sheet-5155498c209
One to one ( 1-1 ) |
One to many ( 1-n ) |
Poly one to many ( 1x-n ) |
Many to many ( n-n ) |
Poly many to many ( nx-n ) |
|
---|---|---|---|---|---|
Number of models | 2 only | 2 only | 3 and above | 2 only | 3 and above |
Number of tables | 2 (1/model) | 2 (1/model) | 3+ (1/model) | 3 (1/model + pivot) | 4+ (1/model + pivot) |
Pivot table | - | - | - | required |
@echo off | |
setlocal enabledelayedexpansion | |
:: Automatically find the Obsidian vault path in the Documents directory | |
set "OBSIDIAN_DIR=" | |
for /d %%D in ("%USERPROFILE%\Documents\*") do ( | |
if exist "%%D\*.md" ( | |
set "OBSIDIAN_DIR=%%D" | |
goto :found | |
) |