Help is here: If something is not working with the links, payments, or downloads, do not hesitate to email us at demerp@alphapresspublishing.com and we will respond ASAP with instructions and solutions.
This book is primarily intended for a training/educational environment in a college, technical institute, or corporate setting. The goal is to learn and practice SQL for data analytics. SQL is used by 63.1% of professionals in the market followed by 54.8% who are using Python according to the 2025 Stack Overflow survey. The reason is that SQL is used beyond transactional databases in platforms such as data warehouses, data marts, data lakes, data engineering, data pipelines, data integration systems, as well as NoSQL databases. Even Big Data ecosystems like Hadoop offer multiple apps using SQL.
To that purpose it contains more than 300 exercises in 34 chapters which the student can complete during class time. It also contains ten questions after each chapter which the instructor can use for in class discussions or test generation. There are more than 300 case questions in total in the book. Finally, it contains sixty case studies, two at the end of each chapter, for additional work as homework or for sharpening the skills learned in each chapter.
The book is the result of the author’s 26 years of teaching at the University level and 32 years of practice on databases. After hundreds of labs and thousands of questions and comments from the students, the author wrote this book to assist the students in becoming SQL specialists. Currently, no matter the position, industry, or job function, it looks like everyone is asking for SQL skills.
CHAPTER 1 FUNDAMENTAL CONCEPTS ON SQL.. 1
CHAPTER 2 SELECTING AND RETRIEVING DATA.. 19
CHAPTER 3 SORTING DATA.. 29
CHAPTER 4 THE OR and AND LOGICAL OPERATORS.. 38
CHAPTER 5 WILDCARD CHARACTERS.. 46
CHAPTER 6 SEARCH PATTERNS with the LIKE OPERATOR.. 55
CHAPTER 7 ABSOLUTE SEARCHES with EQUALITY AND INEQUALITY PREDICATES.. 67
CHAPTER 8 FILTERING BOUNDARIES WITH THE BETWEEN OPERATOR.. 75
CHAPTER 9 DYNAMIC FILTERS WITH THE IN OPERATOR.. 82
CHAPTER 10 RETRIEVING UNIQUE RECORDS - THE DISTINCT PREDICATE.. 93
CHAPTER 11 RETRIEVING TOP OR BOTTOM SETS OF DATA.. 99
CHAPTER 12 MOVING AND APPENDING DATA.. 107
CHAPTER 13 COMBINING DATASETS - THE UNION OPERATOR.. 113
CHAPTER 14 PERFORMING CALCULATIONS.. 127
CHAPTER 15 CONCATENATING DATA.. 137
CHAPTER 16 GROUPING DATA.. 148
CHAPTER 17 AGGREGATING DATA.. 159
CHAPTER 18 CROSSTABBING DATA.. 170
CHAPTER 19 PARAMETERIZING QUERY OUTPUT.. 186
CHAPTER 20 CONDITIONAL DATA MANIPULATION... 196
CHAPTER 21 DUPLICATE, RELATED, and UNRELATED DATA.. 210
CHAPTER 22 NULL VALUES IN DATASETS.. 223
CHAPTER 23 ANALYTICS WITH TEXT FUNCTIONS.. 234
CHAPTER 24 ANALYTICS WITH DATE FUNCTIONS.. 252
CHAPTER 25 UPDATING ROWS IN LARGE DATASETS.. 278
CHAPTER 26 DELETING ROWS IN LARGE DATASETS.. 289
CHAPTER 27 JOINING DATA SETS.. 300
CHAPTER 28 SUBQUERIES FOR DYNAMIC INFERENCES.. 318
CHAPTER 29 DATA TYPE CONVERSION FUNCTIONS.. 329
CHAPTER 30 IMPUTING DATA.. 339
CHAPTER 31 SAMPLING DATA.. 347
REFERENCE CHAPTER 32 CREATE, EDIT, AND DELETE TABLES.. 358
REFERENCE CHAPTER 33 CREATE, EDIT, DELETE RELATIONSHIPS.. 367
REFERENCE CHAPTER 34 CREATE, EDIT, AND DELETE INDEXES.. 379
APPENDIX I THE SAMPLE DATABASE.. 386
INDEX OF TERMS.. 387