Preview

Querying a Clintrial Database: An introduction to SQL for non-programmers

Powerful Essays
Open Document
Open Document
1215 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Querying a Clintrial Database: An introduction to SQL for non-programmers
Introduction to SQL:
Querying a Clintrial Database
Exercise Manual
Toby Odenheim

Introduction to SQL: Querying a Clintrial Database

Page i of 16

Version 1 – January, 2008

Introduction to SQL: Querying a Clintrial Database

Page ii of 16

Contents
1

Lesson 1 Exercises: Basic SQL Statements

5

2

Lesson 2 Exercises: Restricting and Sorting Data

7

3

Lesson 3 Exercises: Single Row Functions

8

4

Lesson 4 Exercises: Joining Tables

11

5

Lesson 5 Exercises: Group Functions:

12

6

Lesson 6 Exercises: Subqueries

13

7

Appendix: Solutions

14

Introduction to SQL: Querying a Clintrial Database

Page iii of 16

Note: All exercises will use Medika_Clinical unless otherwise stated.

1 Lesson 1 Exercises: Basic SQL Statements

1.1

Write a statement to describe all the data in the vital signs table.

What is the name of the item for Systolic Blood Pressure? ____________________
What is its datatype? ____________________
What is its length? ____________________

1.2

Write a statement to display all the data in the demographics table.

1.3

Write a statement to display the subject number, race and gender for each subject.

1.4

Write a statement to display the unique values for race.

What are the values for Race? ____________________
How could we determine the actual race description? ____________________

Introduction to SQL: Querying a Clintrial Database

Page 5 of 16

1.5

CHALLENGE EXERCISE: Write a query to produce the following output:

Introduction to SQL: Querying a Clintrial Database

Page 6 of 16

2 Lesson 2 Exercises: Restricting and Sorting Data

2.1

Display subject and gender where for all males.

2.2

Display subject and systolic blood pressure for all subjects with a systolic blood pressure over 110 but less than 130.

2.3

Display subject and systolic blood pressure for all subjects with a systolic blood pressure that is less

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Unit 18 M1 Research Paper

    • 268 Words
    • 2 Pages

    Student Name Course Computer Science and IT Unit 18 Database Design Assignment Title Features of a relational databes and Testing Mia’s Sandwich Shop Database Assign 2/2 Complete this section before submitting your work: Student declaration: I certify this is my own work. Any sources I have used to assist me with this assignment are fully referenced. Student evaluation: Develop future SMART Targets.…

    • 268 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Exercise3statistics

    • 657 Words
    • 2 Pages

    a. Age, weight, height, BSA, and BMI are the variables that meet the criteria for interval/ratio level of measurement. This is because it the distances between the intervals are equal and there is an absolute zero point.…

    • 657 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    cis3730_Exam1_Studyguide

    • 512 Words
    • 2 Pages

    You will be asked to write SQL scripts to display required information, like we did in the homework.…

    • 512 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    statistics week 2 lab

    • 549 Words
    • 3 Pages

    8. Compare the mean for the heights of males and the mean for the heights of females in these data. Compare the values and explain what can be concluded based on the numbers.…

    • 549 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    A database language must enable the user to perform complex queries designed to transform the raw data into useful information.…

    • 1917 Words
    • 8 Pages
    Powerful Essays
  • Satisfactory Essays

    SQL Queries

    • 423 Words
    • 2 Pages

    Given the table information above, if you were asked to create an Access query that showed the Student Name and Grade for all students taking a class in Room H201, what tables would you need and how would you link them together?…

    • 423 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Sports Rhetoric

    • 943 Words
    • 4 Pages

    This is an interesting year in the NBA because there are plenty of notable names that will be free agents at the end of the season. The summer could bring on the ultimate game of musical chairs for players, swapping teams for more lucrative contracts and a better chance at winning a championship. Of all the free agents, LeBron James has probably been the most talked about when it comes to 2010 restricted free agency. There has been plenty of speculation about the teams he will go to next year if he decides to leave Cleveland. After a loss tonight in game 6 of the Eastern Conference semi-finals, the talk has already begun to escalate as LeBron’s decision becomes more imminent. For that reason I choose to evaluate LeBron’s post-game press conference from the game 6 loss to the Celtics. It is not the typical press conference because of the aforementioned free agency. Moreover, it is an opportunity for him to talk to the fans of Cleveland, and almost apologize for not living up to this year’s expectations. It is also different from the typical press conference because there is some persuading on James’ part. Convincing the reporters in the room, and consequently the people paying attention to the situation, that he has not given any thought to what team he going sign with in the off season.…

    • 943 Words
    • 4 Pages
    Good Essays
  • Good Essays

    8) What can you use to put your collected data into so it is easy to read?…

    • 2132 Words
    • 9 Pages
    Good Essays
  • Powerful Essays

    Database Concepts

    • 1636 Words
    • 7 Pages

    4) An advantage of keeping data in lists is that if you add a new row of data to the list you will never have null values occurring for any data item in the row.…

    • 1636 Words
    • 7 Pages
    Powerful Essays
  • Powerful Essays

    A database is an organized collection of data used for the purpose of modeling some…

    • 7261 Words
    • 30 Pages
    Powerful Essays
  • Good Essays

    This paper investigates such important aspect of car business as database technology, in particular workflow database technology and its influence on the productivity. The main aim of this paper is to investigate the role of database technology in car plants. Nowadays there are hundred of workflow products and technologies at the market. Thus the database technologies are influencing this area this or that way.…

    • 435 Words
    • 2 Pages
    Good Essays
  • Good Essays

    DATABASE SQL

    • 592 Words
    • 2 Pages

    A database is an organized collection of data. The data is typically organized to model aspects of reality in a way that supports processes requiring information.…

    • 592 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    DBMS

    • 3523 Words
    • 15 Pages

    Structural metadata is about the design and specification of data structures and is more properly called "data about the containers of data".…

    • 3523 Words
    • 15 Pages
    Powerful Essays
  • Satisfactory Essays

    Relational Database

    • 407 Words
    • 2 Pages

    A primary key composed of multiple columns used to identify a record uniquely is called…

    • 407 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    aaaaaaaaaaaaaaa

    • 22607 Words
    • 123 Pages

    system if data were stored in an unorganized way or if there were no systematic way to…

    • 22607 Words
    • 123 Pages
    Powerful Essays

Related Topics