Suppose you want to calculate when each game in the fun.games table celebrated its 10th anniversary. (For information about this table, see the result of the DESCRIBE statement in Problem 5 above.) You might try the following query, but using Impala, it will cause an error:
Question 8
Suppose you want to calculate when each game in the fun.games table celebrated its 10th anniversary. (For information about this table, see the result of the DESCRIBE statement in Problem 5 above.) You might try the following query, but using Impala, it will cause an error:
SELECT year + 10 FROM fun.games;
Which of the following would correct the error and make the calculation correctly? Check all that apply.
1 point
- SELECT year + cast(10 STRING) FROM fun.games;
- SELECT cast(year INT) + 10 FROM fun.games;
- SELECT cast(year AS INT) + 10 FROM fun.games;
- SELECT year + cast(10 AS STRING) FROM fun.games;