GoConqr has a new look! Let us know what you think.

Quiz

TE0142

Mario David Barbosa Escobar 127 questions

Take the quiz

Questions in this quiz (127)

  1. 1A company wants a sequential ranking of all employee salaries. They do not want employees with the same salary to be given the same rank number. Which ordered analytical function should be used?
    1. ARANK
    2. BQUANTILE
    3. CROW_NUMBER
    4. DPERCENT_RANK
  2. 2Which two will happen during a transaction when no rows are available in a queue table? (Choose two.)
    1. AThe transaction aborts automatically.
    2. BThe SELECT AND CONSUME statement will generate new rows in the table.
    3. CThe transaction enters a delay state until a row is inserted into the queue table.
    4. DThe transaction aborts either by an ABORT statement, or a DROP TABLE statement on the queue table.
  3. 3Which DCL statement is written correctly?
    1. AGRANT SELECT, EXECUTE, DELETE TO User1 ON User1;
    2. BGRANT SELECT, EXECUTE, DELETE ON Database1 TO Database1;
    3. CGRANT SELECT, EXECUTE, DELETE TO User1 ON DATABASE Database1;
    4. DGRANT SELECT, EXECUTE, DELETE ON DATABASE Database1 TO User1;
  4. 4Given the following: (? = NULL) Column1 Column2
    JA LZ
    JA ?
    MX TX
    MX LZ
    ? ?
    SELECT CASE WHEN column_1 = 'JA' AND column_2 = 'LZ' THEN 'OK'
    WHEN column_1 = 'JA' AND column_2 IS NULL THEN '??'
    WHEN column_1 IS NOT NULL AND column_2 = 'LZ' THEN '??'
    WHEN column_1 = 'DD' THEN '??'
    ELSE 'OK' END FROM table_1;

    How many rows will the SELECT statement return with the value 'OK'?
    1. A1
    2. B2
    3. C3
    4. D4
    5. E5
  5. 5The columns in a Customer table are defined as:
    acctid INTEGER NOT NULL
    acctnm VARCHAR(50)

    and the columns in a Trans table are defined as:
    acctid INTEGER NOT NULL
    amount DECIMAL(8,2) NOT NULL
    The values (where ? indicates NULL) for these columns are the following:
    Customer table Trans table
    acctid acctnm _acctid
    227638 Martin
    220794 Miko
    228326 Nelly
    224753 ?
    216893 Jackie

    Trans table
    acctid amount
    220532 55.38
    227638 21.73
    220794 34.14
    228326 42.88
    223961 20.74
    220794 15.47
    227638 25.64
    228326 47.21
    The values in the amount column need to be presented in a report so that the column values look like the following:
    Amount
    47.21
    42.88
    34.14
    25.64
    21.73
    15.47
    ?
    ?
    Which query provides the desired result?
    1. ASELECT amount
      FROM Customer a LEFT JOIN Trans b ON a.acctid = b.acctid
      ORDER BY 1 DESC;
    2. BSELECT amount
      FROM Customer a LEFT JOIN Trans b WHERE a.acctid = b.acctid
      ORDER BY 1 DESC;
    3. CSELECT amount
      FROM Customer a RIGHT OUTER JOIN Trans b WHERE a.acctid = b.acctid
      ORDER BY 1 DESC;
    4. DSELECT amount FROM Customer a Trans b
      ON a.acctid = b.acctid ORDER BY 1 DESC;
  6. 6Given the following query: SELECT * FROM Tbl_1 WHERE Col_1 NOT IN (SELECT Col_2 FROM Tbl_2);
    If one of the Col2 values is NULL, what is the impact on the Tbl_1 rows returned?
    1. ATbl_1 will return all rows not in Tbl_2.
    2. BTbl_1 will return all of the non-NULL rows.
    3. CNo Tbl_1 rows are returned for the entire query.
    4. DThe Tbl_1 rows that contain a NULL in Col_1 are returned.
  7. 7Given the following: CREATE TABLE table1_ppi (
    column1 INTEGER NOT NULL
    ,column2 INTEGER
    ,column3 DATE FORMAT 'yyyy-mm-dd'
    )
    PRIMARY INDEX (column1) PARTITION BY RANGE_N(column3
    BETWEEN DATE '2002-01-01' AND DATE '2012-12-31' EACH INTERVAL '1' YEAR, NO RANGE);
    ALTER TABLE table1_ppi MODIFY PRIMARY INDEX
    DROP RANGE BETWEEN DATE '2002-01-01' AND DATE '2002-12-31' EACH INTERVAL '1' YEAR;
    What is an effect of the ALTER TABLE statement?
    1. ARows of the dropped partition are deleted.
    2. BRows of the NO RANGE partition are deleted.
    3. CRows are moved from the dropped partition to the save table.
    4. DRows are moved from the dropped partition to the NO RANGE partition.
  8. 8An aggregation query produces the following result:
    storeid prodid sales SumSales
    ----------- --------- ------------- ------------------
    1001 A 100000.00 345000.00
    1001 C 60000.00 345000.00
    1001 D 35000.00 345000.00
    1001 F 150000.00 345000.00
    1002 A 40000.00 100000.00
    1002 C 35000.00 100000.00
    1002 D 25000.00 100000.00
    1003 A 30000.00 165000.00
    1003 B 65000.00 165000.00
    1003 C 20000.00 165000.00
    1003 D 50000.00 165000.00

    Which three queries will produce this result? (Choose three.)
    1. ASELECTstoreid
      , prodid
      , sales
      , SUM(sales) OVER (PARTITION BY storeid
      ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS SumSales
      FROM salestbl
      ORDER BY 1,2;
    2. BSELECTstoreid
      , prodid
      , sales
      , SUM(sales) OVER (PARTITION BY storeid) AS SumSales FROM salestbl
      ORDER BY 1,2;
    3. CSELECTstoreid
      , prodid
      , sales
      , SUM(sales) OVER (PARTITION BY storeid) AS SumSales FROM salestbl
      GROUP BY 1,2,3
      ORDER BY 1,2;
    4. DSELECTstoreid
      , prodid
      , sales
      , SUM(sales) OVER (PARTITION BY storeid) AS SumSales FROM salestbl
      GROUP BY 1,2,3
      ORDER BY 1,2;
  9. 9Which three types of user-defined functions does Teradata support? (Choose three.)
    1. ATable
    2. BLocal
    3. CScalar
    4. DGlobal
    5. EAggregate
  10. 10A SELECT query uses the RANK() OVER (ORDER BY batting_avg DESC) syntax to produce a ranking of baseball players. The top ten baseball players are being ranked based on their batting averages. In the resulting output of the query there will be ten rows. There is a two-way tie for the second position and a three-way tie for the last three positions. What will be the ranking number of the player in the final row?
    1. A7
    2. B8
    3. C9
    4. D10

Information

Description
Quiz on TE0142, created by Mario David Barbosa Escobar on 03/11/2017.
Language
English
Views
2
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?