SQL for fact tables

SQL for fact tables