
VA Officials Here Thursday, Nov. 9
Follow Up Interview With Wanda Shull and Dr Mark Worley, chief of staff of the Veterans Health Care System of the Ozarks, 3 pm Thursday Nov 9, here in Kimpel Hall.
Background on Worley:
SQL Is Fun
Really.
For the next three weeks, you will learn basic coding in SQL, a standard database language. This will enable you to build databases and maintain databases. This language is a core skill in data journalism.
Your homework for Tuesday is this: Review the following material and practice with the exercises. We will work with SQL on Tuesday in class.
- What does SQL stand for?
- What is SQL and Why Do I Need It? Relational database. “SQL is a standard language for storing, manipulating and retrieving data in databases.”
- How Does It Work?
- When Can We Get Started? I Can’t Wait! https://www.w3schools.com/sql/default.asp
This week:
–Orientation with the queries and logic of basic SQL commands
–Import data and create a database
Part 1:Basic Commands.
We will be using this sample database called customers for these drills. Take a look at it.
This data is in our SQL tutorial. Here’s how we extract and filter the records to get what we want.
Major Commands:
SELECT
FROM
WHERE
GROUP BY
ORDER BY
—
SELECT: You tell the database what columns you want.
If you want everything, SELECT *
Example: SELECT * FROM Customers;
–Retrieves EVERYTHING (*) from the database called Customers
SELECT CustomerName FROM Customers;
–Retrieves CustmerName from the database called Customers
FROM: The basic command that just identifies which table you’re pulling data from.
Example: SELECT * FROM Customers;
–Retrieves EVERYTHING (*) from the database called Customers
WHERE: A filter. Allows you to grab only certain records do numerical and text string, or a horizontal slice of your data; you set criteria that has to be true in order for rows to be returned
SELECT * FROM Customers WHERE ContactName “Maria Anders”;
–retrieves all records with Maria Anders as contact name
SELECT * FROM Customers WHERE ContactName LIKE “Maria%”;
–retrieves all records with Maria in ContactName. Note the addition of Like and the wildcard %
Your Turn
Work on the tutorial: https://www.w3schools.com/sql/default.asp
TIP: Print our the table names and the first 2-3 rows of data as a reference
Exercise #1: GROUP BY
– This groups rows together by a certain field or fields so that you can do math on those groups, such as counting the number of records in each group or summing up the numbers in a field.
SELECT COUNT(CustomerID), Country
FROM Customers
GROUP BY Country;
–Here we are counting the number of countries in the database
Remember this command is paired with putting an aggregate function in your SELECT statement, such as COUNT(*) or SUM(noncitizen)
Exercise #2: ORDER BY
– This sorts your results by a field or fields, ascending (default) or descending (DESC)
SELECT COUNT(CustomerID), Country
FROM Customers
GROUP BY Country;
–Produces a list ordered by country, alphabetized
Exercise #3: DESC
–List of countries in descending order
SELECT * FROM Customers
ORDER BY Country DESC;
Quick Reference Sheet for these commands:
Mock Press Conference
Prof. Michelle Parks is looking for students in the News sequence who would be available to come to the mock news conferences she is having in the three PR Writing sections this semester.
This is a good way to build basic experience of attending a press conference and getting to understand the competitive dynamic of posing questions during such an event.
Any interested students can email Parks directly: mparks17@uark.edu
Parks will have a guest PR professional in attendance as well.
Parks’ news conference will be at 3:30 p.m. Tues., Nov. 7, in KIMP 147. Jessi Leonard’s will be at 6:30 p.m. Wed., Nov. 8 in KIMP 147. I’m not sure about Steven Zapata’s news conference date yet, but his class meets on Mondays 5:30-8 p.m. in KIMP 146.
Michelle Parks
Director of Communications
Fay Jones School of Architecture and Design | University of Arkansas
120 Vol Walker Hall | Fayetteville, AR 72701
479.575.4704 | mparks17@uark.edu | fayjones.uark.edu
Handling a Tough Interview
FYI:
From Alecia Shepard, visiting ethics professor:
This interview with NPR’s CEO is a must-listen. It’s a textbook example of how to handle a tough interview.
Mary Louise Kelly does a great job of pushing back and asking some tough questions…