la struttura delle tabelle ed un esempio di quello che intendi realizzare tramite query