Telegram Group & Telegram Channel
Даны следующие таблицы:

Students

| StudentID | Name | Age | Gender |
|-----------|-----------|-----|--------|
| 1 | John | 20 | Male |
| 2 | Jane | 22 | Female |
| 3 | Mark | 21 | Male |
| 4 | Sarah | 23 | Female |
| 5 | Michael | 20 | Male |

Courses

| CourseID | CourseName | Credits |
|----------|------------------|---------|
| 101 | Mathematics | 3 |
| 102 | Physics | 4 |
| 103 | Chemistry | 3 |
| 104 | English | 2 |
| 105 | History | 3 |

Enrollments
| EnrollmentID | StudentID | CourseID |
|--------------|-----------|----------|
| 1 | 1 | 101 |
| 2 | 2 | 101 |
| 3 | 3 | 102 |
| 4 | 4 | 101 |
| 5 | 1 | 103 |
| 6 | 2 | 105 |
| 7 | 3 | 104 |
| 8 | 4 | 102 |
| 9 | 5 | 101 |
| 10 | 5 | 103 |

Какой из следующих SQL запросов отберет всех студентов женского пола, записанных на курс "Mathemetics"?

A) SELECT Name FROM Students WHERE Gender = 'Female' AND StudentID IN (SELECT StudentID FROM Enrollments WHERE CourseName = 'Mathematics')

B) SELECT Name FROM Students JOIN Enrollments ON Students.StudentID = Enrollments.StudentID WHERE Gender = 'Female' AND CourseName = 'Mathematics'

C) SELECT Name FROM Students WHERE Gender = 'Female' AND StudentID = (SELECT StudentID FROM Enrollments WHERE CourseName = 'Mathematics')

D) SELECT Name FROM Students JOIN Enrollments ON Students.StudentID = Enrollments.StudentID WHERE Gender = 'Female' AND CourseID = 101



tg-me.com/sql_for_qa/172
Create:
Last Update:

Даны следующие таблицы:

Students

| StudentID | Name | Age | Gender |
|-----------|-----------|-----|--------|
| 1 | John | 20 | Male |
| 2 | Jane | 22 | Female |
| 3 | Mark | 21 | Male |
| 4 | Sarah | 23 | Female |
| 5 | Michael | 20 | Male |

Courses

| CourseID | CourseName | Credits |
|----------|------------------|---------|
| 101 | Mathematics | 3 |
| 102 | Physics | 4 |
| 103 | Chemistry | 3 |
| 104 | English | 2 |
| 105 | History | 3 |

Enrollments

| EnrollmentID | StudentID | CourseID |
|--------------|-----------|----------|
| 1 | 1 | 101 |
| 2 | 2 | 101 |
| 3 | 3 | 102 |
| 4 | 4 | 101 |
| 5 | 1 | 103 |
| 6 | 2 | 105 |
| 7 | 3 | 104 |
| 8 | 4 | 102 |
| 9 | 5 | 101 |
| 10 | 5 | 103 |

Какой из следующих SQL запросов отберет всех студентов женского пола, записанных на курс "Mathemetics"?

A) SELECT Name FROM Students WHERE Gender = 'Female' AND StudentID IN (SELECT StudentID FROM Enrollments WHERE CourseName = 'Mathematics')

B) SELECT Name FROM Students JOIN Enrollments ON Students.StudentID = Enrollments.StudentID WHERE Gender = 'Female' AND CourseName = 'Mathematics'

C) SELECT Name FROM Students WHERE Gender = 'Female' AND StudentID = (SELECT StudentID FROM Enrollments WHERE CourseName = 'Mathematics')

D) SELECT Name FROM Students JOIN Enrollments ON Students.StudentID = Enrollments.StudentID WHERE Gender = 'Female' AND CourseID = 101

BY SQL для тестировщика


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/sql_for_qa/172

View MORE
Open in Telegram


SQL для тестировщика Telegram | DID YOU KNOW?

Date: |

The seemingly negative pandemic effects and resource/product shortages are encouraging and allowing organizations to innovate and change.The news of cash-rich organizations getting ready for the post-Covid growth economy is a sign of more than capital spending plans. Cash provides a cushion for risk-taking and a tool for growth.

Telegram Gives Up On Crypto Blockchain Project

Durov said on his Telegram channel today that the two and a half year blockchain and crypto project has been put to sleep. Ironically, after leaving Russia because the government wanted his encryption keys to his social media firm, Durov’s cryptocurrency idea lost steam because of a U.S. court. “The technology we created allowed for an open, free, decentralized exchange of value and ideas. TON had the potential to revolutionize how people store and transfer funds and information,” he wrote on his channel. “Unfortunately, a U.S. court stopped TON from happening.”

SQL для тестировщика from sg


Telegram SQL для тестировщика
FROM USA