James Blair
Test por , creado hace más de 1 año

College Stats 224 Test sobre Quiz 3, creado por James Blair el 12/03/2015.

10
0
0
James Blair
Creado por James Blair hace más de 9 años
Cerrar

Quiz 3

Pregunta 1 de 10

1

Which of the following statements regarding the ALTER TABLE statement is false?

Selecciona una de las siguientes respuestas posibles:

  • a. It allows you to update column attributes.

  • b. It allows you to drop columns in your table.

  • c. It allows you to change a character column to a numeric column.

  • d. It allows you to add new columns in your table.

Explicación

Pregunta 2 de 10

1

Which of the following is not a type of integrity constraint?

Selecciona una de las siguientes respuestas posibles:

  • a. NULL

  • b. UNIQUE

  • c. PRIMARY KEY

  • d. CHECK

Explicación

Pregunta 3 de 10

1

Which of the following PROC SQL steps gives bonuses (in points) to frequent-flyer program members as follows:
a 50% bonus for members who traveled less than 10,000 miles
a 100% bonus for members who traveled 10,000 miles or more?

Selecciona una de las siguientes respuestas posibles:

  • a. proc sql;
    update work.frequentflyers
    set pointsearned=pointsearned*
    case when milestraveled < 10000
    then pointsearned*1.5
    when milestraveled >= 10000
    then pointsearned*2
    else pointsearned*1
    end;

  • b. proc sql;
    update work.frequentflyers
    set pointsearned=pointsearned*
    case if milestraveled < 10000
    then pointsearned*1.5
    if milestraveled >= 10000
    then pointsearned*2
    else pointsearned*1
    end;

  • c. proc sql;
    update work.frequentflyers
    set pointsearned=pointsearned*
    case when milestraveled < 10000
    then 1.5
    when milestraveled >= 10000
    then 2
    else 1

    end;

  • d. proc sql;
    update work.frequentflyers
    set pointsearned=pointsearned*
    case if milestraveled < 10000
    then 1.5
    if milestraveled >= 10000 then 2
    else 1

    end;

Explicación

Pregunta 4 de 10

1

Which of the following creates an empty table that contains the 2 columns FullName and Age?

Selecciona una de las siguientes respuestas posibles:

  • a. proc sql;
    create work.names
    (FullName char(25), Age num);

  • b. proc sql;
    create table work.names
    set (FullName char(25), Age num);

  • c. proc sql;
    create table work.names
    (FullName char(25), Age num);

  • d. proc sql;
    create table work.names as
    (FullName char(25), Age num);

Explicación

Pregunta 5 de 10

1

Which statement is false regarding the keyword CORRESPONDING?

Selecciona una de las siguientes respuestas posibles:

  • a. It cannot be used with the keyword ALL.

  • b. When used in EXCEPT, INTERSECT, and UNION set operations, it removes any columns not found in both tables.

  • c. It overlays columns by name, not by position.

  • d. When used in OUTER UNION set operations, it causes same-named columns to be overlaid.

Explicación

Pregunta 6 de 10

1

Using an index is not likely to optimize a PROC SQL query in which of the following situations?

Selecciona una de las siguientes respuestas posibles:

  • a. The query contains an IN subquery that references the key column.

  • b. The query is an equijoin, and all the columns in the join expression are indexed in one of the tables being joined.

  • c. The key column is specified only in a SELECT clause.

  • d. The key column is specified in a WHERE clause expression that contains a comparison operator, the TRIM or SUBSTR function, the CONTAINS operator, or the LIKE operator.

Explicación

Pregunta 7 de 10

1

Which of the following will create a composite index for the table Sasuser.Flightdelays? (Sasuser.Flightdelays contains the following columns: Date, FlightNumber, Origin, Destination, DelayCategory, DestinationType, DayOfWeek, and Delay.)

Selecciona una de las siguientes respuestas posibles:

  • a. proc sql;
    create composite index places
    on sasuser.flightdelays (flightnumber, destination);

  • b. proc sql;
    create index on flightnumber,destination
    from sasuser.flightdelays (places);

  • c. proc sql;
    create index destination
    on sasuser.flightdelays(flightnumber, destination);

  • d. proc sql;
    create index places
    on sasuser.flightdelays (flightnumber, destination);

Explicación

Pregunta 8 de 10

1

Which keyword must you add to your index definition in the CREATE INDEX
statement to ensure that no duplicate values of the key column can exist?

Selecciona una de las siguientes respuestas posibles:

  • a. KEY

  • b. UNIQUE

  • c. NODUPKEY

  • d. NODUPS

Explicación

Pregunta 9 de 10

1

Which of the following is false regarding the IDXNAME= data set option?

Selecciona una de las siguientes respuestas posibles:

  • a. The option allows you to create and name an index on the table.

  • b. The option directs SAS to use an index that you specify.

  • c. The specified index must be suitable by having at least its first or only column match a condition in the WHERE expression.

  • d. The specified index must exist.

Explicación

Pregunta 10 de 10

1

In order for PROC SQL to perform an inner join,

Selecciona una de las siguientes respuestas posibles:

  • a. the columns that are specified in a join condition in the WHERE clause must have the same data type.

  • b. the columns that are specified in a join condition in the WHERE clause must have the same name.

  • c. the tables being joined must contain the same number of columns.

  • d. the tables must be sorted before they are joined.

Explicación