6. Regular Expressions/SQL.
Write SQL for the following problems on the university database.
A. Find students whose name is properly capitalized (both first and last name start from an upper-case letter, rest of the name is lower-case). Hint: you can use [A-Z] to represent any upper case letter in regular expressions.
B. Find course titles that consist of exactly 3 words (e.g., “Theory of Computation”).
C. Find students whose SSN numbers has a pattern of 321 repeated twice (sequentially).
a) select *
from student_table
where firstname LIKE '[A-Z]%' and lastname LIKE '[A-Z]%';
b)select *
from course
where course_title LIKE '% % %';
c)select *
from student_table
where ssn LIKE '%321321% OR '321321%' OR '%321321';
6. Regular Expressions/SQL. Write SQL for the following problems on the university database. A. Find students...
Question 1.Write a SQL statement for each of the following questions based on the above tables (50 Points). 1) Create “Enrollment” table. 2) Change the credits of “Database” course from 2 to 3. 3) List the course titles (not Course_No) and grades John Doe had taken. 4) Calculate average of Café Balance, and name new field as Average Balance. 5) Create a roster for “Database” course (list student ID, last name, first name, major, and status for each student enrolled...
Use only a single SQL statement for each of the following questions 1 Give a listing of all the ssns,first names and the class descriptions of all the classes the students are taking. If there are no class _descriptions display 'No description is available yet'. (USE NVL) 2 Give a listing of only the lname and the class_code for students who are taking 'Introduction to C programming'. (Inner join) 3 Give a lising of all the class_descriptions and the number...
In your judgement, and given only the facts described in this case, should the management of Massey energy Company be held morally responsible for the deaths of the 29 miners? Explain in detail. Suppose that nothing more is learned about the explosion other than what is described in this case. Do you think Don Blankership should be held morally responsible for the deaths of the 29 miners? Explain in detail. Given only the facts described in this case, should the...