2.7 Flashcards
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) wide table
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
b) narrow table
The measures (test scores) are stacked into a single column.
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;
c) Subject=”Reading”;