[raj@tinman project]$ mysql -u raj -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 28584
Server version: 8.0.17 MySQL Community Server - GPL

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use raj
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> source q1.sql
+---------+-------+---------------+------------+--------+------------+
| ltype   | state | lname         | fname      | gender | birthday   |
+---------+-------+---------------+------------+--------+------------+
| Hrep    | CA    | Bass          | Karen      | F      | 1953-10-03 |
| Hrep    | CA    | Levin         | Mike       | M      | 1978-10-28 |
| Hrep    | CA    | Nunes         | Devin      | M      | 1973-10-01 |
| Hrep    | CA    | Panetta       | Jimmy      | M      | 1969-10-01 |
| Hrep    | CA    | Sherman       | Brad       | M      | 1954-10-24 |
| Hrep    | GA    | Johnson       | Henry      | M      | 1954-10-02 |
| Hrep    | IL    | Bustos        | Cheri      | F      | 1961-10-17 |
| Hrep    | IL    | Foster        | Bill       | M      | 1955-10-07 |
| Hrep    | IL    | Quigley       | Mike       | M      | 1958-10-17 |
| Hrep    | IL    | Underwood     | Lauren     | F      | 1986-10-04 |
| Hrep    | IN    | Carson        | André      | M      | 1974-10-16 |
| Hrep    | LA    | Scalise       | Steve      | M      | 1965-10-06 |
| Hrep    | MA    | Kennedy       | Joseph     | M      | 1980-10-04 |
| Hrep    | MA    | Moulton       | Seth       | M      | 1978-10-24 |
| Hrep    | MA    | Trahan        | Lori       | F      | 1973-10-27 |
| Hrep    | MD    | Mfume         | Kweisi     | M      | 1948-10-24 |
| Hrep    | MI    | Lawrence      | Brenda     | F      | 1954-10-18 |
| Hrep    | MN    | Omar          | Ilhan      | F      | 1981-10-04 |
| Hrep    | MO    | Cleaver       | Emanuel    | M      | 1944-10-26 |
| Hrep    | MO    | Hartzler      | Vicky      | F      | 1960-10-13 |
| Hrep    | NC    | Budd          | Ted        | M      | 1971-10-21 |
| Hrep    | NC    | McHenry       | Patrick    | M      | 1975-10-22 |
| Hrep    | ND    | Armstrong     | Kelly      | M      | 1976-10-08 |
| Hrep    | NJ    | Pallone       | Frank      | M      | 1951-10-30 |
| Hrep    | NY    | Higgins       | Brian      | M      | 1959-10-06 |
| Hrep    | NY    | Meng          | Grace      | F      | 1975-10-01 |
| Hrep    | NY    | Ocasio-Cortez | Alexandria | F      | 1989-10-13 |
| Hrep    | NY    | Serrano       | José       | M      | 1943-10-24 |
| Hrep    | OH    | Fudge         | Marcia     | F      | 1952-10-29 |
| Hrep    | OR    | Bonamici      | Suzanne    | F      | 1954-10-14 |
| Hrep    | OR    | Schrader      | Kurt       | M      | 1951-10-19 |
| Hrep    | PA    | Keller        | Fred       | M      | 1965-10-23 |
| Hrep    | TN    | Fleischmann   | Charles    | M      | 1962-10-11 |
| Hrep    | TN    | Kustoff       | David      | M      | 1966-10-08 |
| Hrep    | TX    | Doggett       | Lloyd      | M      | 1946-10-06 |
| Hrep    | VA    | McEachin      | A.         | M      | 1961-10-10 |
| Senator | CA    | Harris        | Kamala     | F      | 1964-10-20 |
| Senator | HI    | Schatz        | Brian      | M      | 1972-10-20 |
| Senator | MD    | Cardin        | Benjamin   | M      | 1943-10-05 |
| Senator | NM    | Heinrich      | Martin     | M      | 1971-10-17 |
| Senator | OR    | Merkley       | Jeff       | M      | 1956-10-24 |
| Senator | RI    | Whitehouse    | Sheldon    | M      | 1955-10-20 |
| Senator | SD    | Rounds        | Mike       | M      | 1954-10-24 |
| Senator | WA    | Cantwell      | Maria      | F      | 1958-10-13 |
| Senator | WA    | Murray        | Patty      | F      | 1950-10-11 |
+---------+-------+---------------+------------+--------+------------+
45 rows in set (0.05 sec)

mysql> source q2.sql
+-------+---------+-------------+------+
| state | lname   | fname       | age  |
+-------+---------+-------------+------+
| MO    | Hawley  | Joshua      |   42 |
| AR    | Cotton  | Tom         |   45 |
| AZ    | Sinema  | Kyrsten     |   46 |
| CO    | Gardner | Cory        |   48 |
| CT    | Murphy  | Christopher |   49 |
+-------+---------+-------------+------+
5 rows in set (0.00 sec)

mysql> source q3.sql
+-------+----------+
| state | NumHreps |
+-------+----------+
| CA    |       52 |
| TX    |       35 |
| NY    |       27 |
| FL    |       27 |
| IL    |       18 |
| PA    |       18 |
| OH    |       16 |
| MI    |       14 |
| NJ    |       12 |
| GA    |       12 |
| NC    |       12 |
| VA    |       11 |
| WA    |       10 |
+-------+----------+
13 rows in set (0.01 sec)

mysql> source q4.sql
+--------+--------+-----------+
| Senate | gender | count(id) |
+--------+--------+-----------+
| Senate | M      |        74 |
| Senate | F      |        26 |
| Hrep   | M      |       331 |
| Hrep   | F      |       105 |
+--------+--------+-----------+
4 rows in set (0.00 sec)

mysql> exit
Bye
[raj@tinman project]$