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: |

A Telegram spokesman declined to comment on the bond issue or the amount of the debt the company has due. The spokesman said Telegram’s equipment and bandwidth costs are growing because it has consistently posted more than 40% year-to-year growth in users.

Spiking bond yields driving sharp losses in tech stocks

A spike in interest rates since the start of the year has accelerated a rotation out of high-growth technology stocks and into value stocks poised to benefit from a reopening of the economy. The Nasdaq has fallen more than 10% over the past month as the Dow has soared to record highs, with a spike in the 10-year US Treasury yield acting as the main catalyst. It recently surged to a cycle high of more than 1.60% after starting the year below 1%. But according to Jim Paulsen, the Leuthold Group's chief investment strategist, rising interest rates do not represent a long-term threat to the stock market. Paulsen expects the 10-year yield to cross 2% by the end of the year. A spike in interest rates and its impact on the stock market depends on the economic backdrop, according to Paulsen. Rising interest rates amid a strengthening economy "may prove no challenge at all for stocks," Paulsen said.

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


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