-- logging. mysql -u yue -p use toyu; SELECT * FROM student; tee 2025_1_15_sql_log.txt SHOW databases; -- MySQL: scheme = database DROP SCHEMA IF EXISTS toyu; source Createtoyu.sql [1] List the stuId, names, major departments and minor code of all students minoring in CSCI, CINF or ITEC in the following manner. +--------+-----------------+------------------------------+-------+ | stuId | student | major | minor | +--------+-----------------+------------------------------+-------+ | 100000 | Tony Hawk | Computer Science | CINF | | 100001 | Mary Hawk | Computer Science | CINF | | 100002 | David Hawk | Computer Science | ITEC | | 100003 | Catherine Lim | Information Technology | CINF | | 100006 | Lillian Johnson | Computer Information Systems | ITEC | | 100009 | Linda King | Arts | CSCI | +--------+-----------------+------------------------------+-------+ 6 rows in set) [1a] List the stuid, fname, lname, major, and minor of all students. Analysis: [1] Output: [2] Sources: [3] Conditions: Analysis: [1] Output: stuid, fname, lname, major, minor [2] Sources: student [3] Conditions: none SELECT DISTINCT -- [1] FROM -- [2] WHERE -- [3] ; SELECT DISTINCT stuid, fname, lname, major, minor -- [1] FROM student -- [2] ; [1b] List the stuid, name (e.g. 'Tony Hawk'), major, and minor of all students. [1] Output: label: value stuid, student: concatenate fname, ' ', lname. major, minor [2] Sources: student [3] Conditions: none SELECT DISTINCT stuid, CONCAT(student.fname, ' ', lname) AS student -- alias: label , major, minor -- [1] FROM student -- [2] ;