Understanding and Applying SQL: A Comprehensive Guide