Added SQL Query for Tables