Example:
Table: Unit
ID NAME VALUE
1 Kilo 1000
2 Mega 1000000
3 Giga 1000000000
Table: Storage
ID Title Drive_value Drive_unit_ID Cache_value Cache_unit_ID
1 Seagate 100 3 400 1
2 Scansoft 250 3 80 2
Relations:
Storage.Cache_unit_ID references Unit.ID
Storage.Drive_unit_ID references Unit.ID
Desired Goal:
To do a select * from Storage, display new columns ‘AS’ Drive and ‘AS’ Cache and display this by multiplying appropriate Unit.VALUE
Title Drive Cache
Seagate 100000000000 400000
Scansoft 250000000000 80000000000
You can join the same table any number of times as long as you alias the joined tables: