Question

I have no experience with SQL and I need to write commands to query the following:...

I have no experience with SQL and I need to write commands to query the following:

List all patients with the last name of “Johnson”.

List all patients who are female.

List all patient last names and the medical record number of each.

I've watched Khanacademy videos and tried some other online tutorials but I just cannot find the information or help I need to finish this assignment. I'm in an HIM program, but that is not an option on the course info below.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

List all patients with the last name of “Johnson”.


Select *from tablename where last name = "Johnson"

Note: tablename - mention database table name
last name- mention field name


List all patients who are female.


Select *from tablename where gender = "female"

tablename- use your own table name
gender - use your field name


List all patient last names and the medical record number of each.


Select lastname, medicalrecord from tablename

lastname- use your field name
medicalrecord- use your field name

tablename- use your tablename

Add a comment
Know the answer?
Add Answer to:
I have no experience with SQL and I need to write commands to query the following:...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need to write an SQL statement to run this query: SALES has the following column...

    I need to write an SQL statement to run this query: SALES has the following column names: vendorid, name, upc, move, price, qty, year, store the table name is SALES... the sales is not a column in the SALES so it needs to be created in the query with the formula as well. QUESTION BELOW: Query 4: Return the vendor id, vendor name, product UPC code, move, and sales (price * move/qty) for each product sold by store 100 in...

  • I need to create a SQL query that displays the names of the customers who purchased...

    I need to create a SQL query that displays the names of the customers who purchased the book with the highest retail price in the database. Also I need to capitalize the first and last names. CUSTOMERS Table: CUSTOMER#, LASTNAME, FIRSTNAME, ADDRESS, CITY, STATE, ZIP, REFERRED, REGION, EMAIL ORDERS Table: ORDER#, CUSTOMER#, ORDERDATE, SHIPDATE, SHIPSTREET, SHIPCITY, SHIPSTATE, SHIPZIP, SHIPCOST ORDERITEMS Table: ORDER#, ITEM#, ISBN, QUANTITY, PAIDEACH

  • NEED the SQL query that solves each problem 4) List the member numbers of all members...

    NEED the SQL query that solves each problem 4) List the member numbers of all members who rented a movie. Do not list duplicates. (w3schools -> SQL Distinct) 5) List the member names [first and last] for members from Kentucky {KY}. (w3schools -> SQL Where) 6) List the names of all movies in alphabetical order (w3schools -> SQL ORDER BY) 7) List the movie title and cost in descending order by cost (w3schools -> SQL Order By) 8) List all...

  • SQL injection problem I am studying web security and need to do a simple SQL injection...

    SQL injection problem I am studying web security and need to do a simple SQL injection to a self-built webpage. The webpage consists of a basic login page(username field and password field and a submit button). After submission of the data to a php file, it gives the result of authentication. .I need to bypass the authentication only knowing the ID is 'administrator'. The php file is like this: I tried inputting "admin';--" in the username field and password is...

  • I need this written in SQL Employee EMP ID EMP FNAME EMP LNAME EMP STREET EMP...

    I need this written in SQL Employee EMP ID EMP FNAME EMP LNAME EMP STREET EMP CITY EMP STATE EMP ZIP EMP START DATE Table TABLE ID AREA IDTABLE SEATS Area AREA ID AREA NAME AREA SUPERVISOR EMPLOYEE ID Customer CUST ID CUST LAST NAME CUST NUMBER OF GUESTS Assignment EMPID TABLE ID Seating CUST IDTABLE ID SEATING COST SEATING DATE SEATING TIP Question 29 (10 points) Write an SQL query to list the employee ID and first and last...

  • List the names of all customers who bought both envelopes and labels (either in the same order or different orders).please give me an sql query for this question and i have tables as follows customer(...

    List the names of all customers who bought both envelopes and labels (either in the same order or different orders).please give me an sql query for this question and i have tables as follows customer(customer_name,address,zipcode,customer_id,state),office_supplies(item_name,item_id,cost,category),orders(order_id,date,customer_id) order_details(quantity,order_id,item_id)

  • What would I have to write into the MySQL Workbench query to execute these commands? -...

    What would I have to write into the MySQL Workbench query to execute these commands? - Show all vendor information with vendor contact information in upper case like "SMITH". - Show the customer balance in total, in average, in minimized and in maximized value. - Show all customer information whose balance is greater than $500. - Aggregate the total cost of products grouped by V_CODE, and only show the records with total exceeds $500, and list the records in descending...

  • I am using Oracle SQL and am new to it. I have seven tables, one of...

    I am using Oracle SQL and am new to it. I have seven tables, one of them is a subtable of two of the others. I need to do the following queries: 1. List all Patients and what Bed they are assigned to 2. List all patients who had Treatments and what Treatment they received 3. List all patients who had tests and what Test they had 4. List the employees (doctors, nurses, etc.) who assisted each patient. 5. List...

  • I have already turned in my HW, I need some understanding of the below SQL queries....

    I have already turned in my HW, I need some understanding of the below SQL queries. 1. Find the number of employees in each department. 2. List the names of departments that have more than 5 employees working there. 3. Retrieve the lowest and highest salary in each department. Output the department name in alphabetical order. Consider the following relational schema. An employee can work in more than on department; also, the percentTime field of the Works relations shows the...

  • QUESTION: (Answer in SQL) Write an SQL query to find all pairs of users (A,B) such...

    QUESTION: (Answer in SQL) Write an SQL query to find all pairs of users (A,B) such that both A and B have blurted on a common topic but A is not following B. Your query should print the names of A and B in that order. BACKGROUND INFO: Users can post their thoughts in form of short messages that we call “blurts”. When signing up, users need to provide their email and a password of their choice. In addition, they...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT