User
Write something
2 SQL Queries Every QA Should Know (Part 2)
In Part 1, I discussed database types and why QAs need to learn how to do the READ operations. Now let's dive into the actual SQL commands you'll use daily. [`User` Table] โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ID โ”‚ Name โ”‚ Email โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 1 โ”‚ john โ”‚ john@test.com 2 โ”‚ mary | mary@test.com 3 โ”‚ bob โ”‚ bob@test.com โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ–ถ ๐๐ฎ๐ž๐ซ๐ฒ #๐Ÿ: ๐๐š๐ฌ๐ข๐œ `๐’๐„๐‹๐„๐‚๐“` - ๐‘๐ž๐š๐ ๐€๐ฅ๐ฅ ๐ƒ๐š๐ญ๐š ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท SELECT * FROM Users; ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท What it does: Returns ALL columns and ALL rows from the Users table. QA Example: After registering multiple users, you want to see all newly created accounts in the database. โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ–ถ ๐๐ฎ๐ž๐ซ๐ฒ #๐Ÿ: `๐’๐„๐‹๐„๐‚๐“ ๐–๐ข๐ญ๐ก ๐–๐‡๐„๐‘๐„` - ๐…๐ข๐ฅ๐ญ๐ž๐ซ๐ž๐ ๐‘๐ž๐š๐ ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท SELECT * FROM Users WHERE Email = 'bob@test.com'; ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท What it does: Returns all data in the row for the user with that specific email address: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ‘ โ”‚ ๐›๐จ๐› โ”‚ ๐›๐จ๐›@๐ญ๐ž๐ฌ๐ญ.๐œ๐จ๐ฆ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ QA Example: Test user registration and verify that exact account was created with correct details. โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐“๐ข๐ฉ๐ฌ: โŸก Start with `๐’๐„๐‹๐„๐‚๐“ *` to see all data, then add `๐–๐‡๐„๐‘๐„` to narrow it down โŸก Always test your queries on a test database first, never production ๐.๐’. ๐Ÿšฉ ๐ˆ๐Ÿ ๐ฒ๐จ๐ฎ ๐ก๐š๐ฏ๐ž๐งโ€™๐ญ ๐ฐ๐š๐ญ๐œ๐ก๐ž๐ ๐ข๐ญ ๐ฒ๐ž๐ญ, ๐ฒ๐จ๐ฎ๐ซ ๐ง๐ž๐ฑ๐ญ ๐ฌ๐ญ๐ž๐ฉ ๐ข๐ฌ ๐ญ๐ก๐ž ๐…๐‘๐„๐„ ๐Ÿ‘-๐ฉ๐š๐ซ๐ญ โ€œ๐Œ๐š๐ง๐ฎ๐š๐ฅ ๐๐€ โ†’ ๐’๐ƒ๐„๐“โ€ ๐ฐ๐จ๐ซ๐ค๐ฌ๐ก๐จ๐ฉ,ย ๐š ๐ฌ๐ก๐จ๐ซ๐ญ ๐ฆ๐ข๐ง๐ข-๐œ๐จ๐ฎ๐ซ๐ฌ๐ž ๐ญ๐ก๐š๐ญ ๐ ๐ข๐ฏ๐ž๐ฌ ๐ฒ๐จ๐ฎ ๐ญ๐ก๐ž ๐Ÿ๐ฎ๐ฅ๐ฅ ๐ซ๐จ๐š๐๐ฆ๐š๐ฉ ๐ญ๐จ ๐›๐ž๐œ๐จ๐ฆ๐ข๐ง๐  ๐š ๐ฆ๐ข๐-๐ฅ๐ž๐ฏ๐ž๐ฅ ๐’๐ƒ๐„๐“ ๐š๐ง๐ ๐ฉ๐š๐ฌ๐ฌ๐ข๐ง๐  ๐ข๐ง๐ญ๐ž๐ซ๐ฏ๐ข๐ž๐ฐ๐ฌ.
8
0
2 SQL Queries Every QA Should Know (Part 2)
Which Database Should QA Beginners Learn First?
I received several DMs asking the same question: "Should I learn SQL or NoSQL first?" Here's the straightforward answer... โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ As a beginner who is learning Databases, SQL databases are your best bet. Here's why: โžค SQL has universal standards that work across different databases (MySQL, PostgreSQL, SQL Server, etc.) โžค SQL databases are extremely popular. The chances of using SQL at work are incredibly high Simply put: learn SQL first, and you'll be prepared for most real-world job scenarios. โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ In case you did not know the difference: ๐’๐๐‹ ๐ฏ๐ฌ ๐๐จ๐’๐๐‹: ๐“๐ก๐ž ๐“๐ฐ๐จ ๐Œ๐š๐ฃ๐จ๐ซ ๐ƒ๐š๐ญ๐š๐›๐š๐ฌ๐ž ๐“๐ฒ๐ฉ๐ž๐ฌ Think of databases as organized storage systems for data. There are two main types: ๐’๐๐‹ ๐ƒ๐š๐ญ๐š๐›๐š๐ฌ๐ž - This is essentially a super-powered Excel spreadsheet that stores data in tables with rows and columns. Each piece of information has its specific type (number, text, etc) and place. Everything follows a strict structure. ๐๐จ๐’๐๐‹ ๐ƒ๐š๐ญ๐š๐›๐š๐ฌ๐ž - Think of this as storage for JSON-like files. Data is stored like individual files or nested folders where each entry can have different fields and structures. One user might have 5 pieces of information, another might have 10. Both work fine. It's flexible and doesn't force everything into the same format. โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Another important focus is: start with learning READ operations In most testing scenarios, whether manual or automated tests interact with an application through its interface, you need to verify that the ๐œ๐จ๐ซ๐ซ๐ž๐œ๐ญ ๐๐š๐ญ๐š ๐ฐ๐š๐ฌ ๐ฌ๐š๐ฏ๐ž๐ ๐ข๐ง ๐ญ๐ก๐ž ๐›๐š๐œ๐ค๐ž๐ง๐. For example: โžค User registers on a website โ†’ You check the database to confirm their account was created โžค User updates their profile โ†’ You verify the changes were stored correctly โžค User deletes an item โ†’ You confirm it's actually removed from the database SQL READ operations allows you to peek behind the scenes and validate what really happened in the system. ๐.๐’. ๐Ÿšฉ ๐ˆ๐Ÿ ๐ฒ๐จ๐ฎ ๐ก๐š๐ฏ๐ž๐งโ€™๐ญ ๐ฐ๐š๐ญ๐œ๐ก๐ž๐ ๐ข๐ญ ๐ฒ๐ž๐ญ, ๐ฒ๐จ๐ฎ๐ซ ๐ง๐ž๐ฑ๐ญ ๐ฌ๐ญ๐ž๐ฉ ๐ข๐ฌ ๐ญ๐ก๐ž ๐…๐‘๐„๐„ ๐Ÿ‘-๐ฉ๐š๐ซ๐ญ โ€œ๐Œ๐š๐ง๐ฎ๐š๐ฅ ๐๐€ โ†’ ๐’๐ƒ๐„๐“โ€ ๐ฐ๐จ๐ซ๐ค๐ฌ๐ก๐จ๐ฉ,ย ๐š ๐ฌ๐ก๐จ๐ซ๐ญ ๐ฆ๐ข๐ง๐ข-๐œ๐จ๐ฎ๐ซ๐ฌ๐ž ๐ญ๐ก๐š๐ญ ๐ ๐ข๐ฏ๐ž๐ฌ ๐ฒ๐จ๐ฎ ๐ญ๐ก๐ž ๐Ÿ๐ฎ๐ฅ๐ฅ ๐ซ๐จ๐š๐๐ฆ๐š๐ฉ ๐ญ๐จ ๐›๐ž๐œ๐จ๐ฆ๐ข๐ง๐  ๐š ๐ฆ๐ข๐-๐ฅ๐ž๐ฏ๐ž๐ฅ ๐’๐ƒ๐„๐“ ๐š๐ง๐ ๐ฉ๐š๐ฌ๐ฌ๐ข๐ง๐  ๐ข๐ง๐ญ๐ž๐ซ๐ฏ๐ข๐ž๐ฐ๐ฌ.
7
0
Which Database Should QA Beginners Learn First?
1-2 of 2
QA Automation Accelerator
skool.com/qa-automation-career-hub
Become a job-ready QA Automation Engineer/SDET in 3โ€“4 months. AI-powered prep, real SaaS project, Certificate of Completion, and live support. ๐Ÿš€
Leaderboard (30-day)
Powered by