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
  • 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

    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
  • 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
  • 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

    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
  • Satisfactory Essays

    Dbms

    • 254 Words
    • 2 Pages

    UNIT1: Introduction: Data base system concepts and architecture, Data models schema and instances, Data independence and data base language and interface, Data definition languages, DML. Overall data base structure. Various Data models: Hierarchical, Network, ER and their comparisons…

    • 254 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Database Systems

    • 817 Words
    • 4 Pages

    The entity-relationship model (or ER model) is a way of graphically representing the logical relationships of entities (or objects) in order to create a database.…

    • 817 Words
    • 4 Pages
    Good 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
  • 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

    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
  • Good Essays

    2.5 Database Analysis

    • 823 Words
    • 4 Pages

    MySQL feature allows for the test.sql files to be exported. These files contain all of the relevant information associated with a particular database, such as tables, views, etc. There are a variety of database backups available depending on the database and its functionality. A full backup allows of the information associated with each of the database tables to be stored in a safe environment and thus allowing for the information to be accessed or configured in the future disregarding any loss of data or other mishaps that may occur. Data back-up forms a vital part of web application and other application…

    • 823 Words
    • 4 Pages
    Good Essays

Related Topics