2.7 Flashcards

1
Q

Suppose a table includes one row for each student, and separate columns for math and reading test scores. Which of the following would best describe this table structure?

a) wide table
b) narrow table

A

a) wide table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Suppose a table includes multiple rows for each student with one row for each test score. There is a column indicating the subject, and another for the score. Which of the following would best describe this table structure?

a) wide table
b) narrow table

A

b) narrow table

The measures (test scores) are stacked into a single column.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which additional statement is required to convert the table structure below from a wide to a narrow?

Name Math Reading
Alfred 82 79
Alice 71 67
Barbara 96 86

data class_test_narrow;
    set pg2.class_test_wide;
   keep Name Subject Score;
   length Subject $ 7;
   Subject="Math";
   Score=Math;
   output;
   ???;
   Score=Reading;
   output;
run;

a) drop Reading Math;
b) by Name;
c) Subject=”Reading”;
d) where Score ne 0;

A

c) Subject=”Reading”;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly