Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python and SQL Bible

You're reading from  Python and SQL Bible

Product type Book
Published in Jun 2024
Publisher Packt
ISBN-13 9781836206279
Pages 519 pages
Edition 1st Edition
Languages
Author (1):
Cuantum Technologies LLC Cuantum Technologies LLC
Profile icon Cuantum Technologies LLC
Toc

Table of Contents (29) Chapters close

1. Who we are 2. Introduction
3. Chapter 1: Python: An Introduction 4. Chapter 2: Python Building Blocks 5. Chapter 3: Controlling the Flow 6. Chapter 4: Functions, Modules, and Packages 7. Chapter 5: Deep Dive into Data Structures 8. Chapter 6: Object-Oriented Programming in Python 9. Chapter 7: File I/O and Resource Management 10. Chapter 8: Exceptional Python 11. Chapter 9: Python Standard Library 12. Chapter 10: Python for Scientific Computing and Data Analysis 13. Chapter 11: Testing in Python 14. Chapter 12: Introduction to SQL 15. Chapter 13: SQL Basics 16. Chapter 14: Deep Dive into SQL Queries 17. Chapter 15: Advanced SQL 18. Chapter 16: SQL for Database Administration 19. Chapter 17: Python Meets SQL 20. Chapter 18: Data Analysis with Python and SQL 21. Chapter 19: Advanced Database Operations with SQLAlchemy 22. References
23. Conclusion
24. Where to continue?
25. Know more about us
Appendix A: Python Interview Questions
1. Appendix B: SQL Interview Questions
2. Appendix C: Python Cheat Sheet 3. Appendix D: SQL Cheat Sheet

12.6 Practical Exercises

These exercises are designed to reinforce your understanding of SQL syntax and concepts. It is highly recommended that you use an SQL database software or an online SQL platform to perform these exercises.

Exercise 1

Create a table called "Students" with the following columns: StudentID (integer, primary key), FirstName (varchar), LastName (varchar), Age (integer), Major (varchar).

Exercise 2

Insert 5 records into the "Students" table with values of your choice.

Exercise 3

Write a query to select all students who are majoring in "Computer Science".

Exercise 4

Update the major of the student with StudentID = 1 to "Data Science".

Exercise 5

Delete the record of the student with StudentID = 1.

Exercise 6

Write a query to select all students, ordered by their age in descending order.

Exercise 7

Write a query to count the number of students for each major.

Take your time with these exercises and...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime