include joins sql in queries