A table is defined by the following statement: CREATE TABLE Impression ( bannerid…
- User
A table is defined by the following statement:
CREATE TABLE Impression ( banner_id INTEGER, background_color VARCHAR(6), banner_width REAL, banner_height REAL, cost_per_click DECIMAL(3,3), is_click BOOLEAN );
Choose the correct query for getting data from this table.
Select one option from the list HINT by look for I and i
SELECT banner_id, cost_per_click FROM Impression;
SELECT cost_per_click as "cost per click in US dollars";
SELECT * FROM table;
SELECT banner_id, banner_width, banner_height FROM banner;
- Assistant
The correct query for getting data from this table is:
SELECT banner_id, cost_per_click FROM Impression;
- User
What does database schema (template) include?
Select one or more options from the list Report a typo HINT by avatar Samarth Jain 3/6 names and types Was this hint helpful?
Size that database takes on the computer
Nothing of this
Table names
Column types
Number of columns
Columns names
- Assistant
A database schema (template) typically includes:
- Table names
- Column types
- Number of columns
- Columns names
- User
After SELECT The table "winners" has the following columns:
integer year
boolean is_winner
varchar(50) discipline
integer place (0, 1, 2)
varchar(50) full_name
varchar(30) nation
Consider the following query:
SELECT ? FROM winners;
What should be placed instead of a ? in order to generate the result shown below?
year
discipline
place
full_name
1948
Skating, men, single
1
Dick Button
1948
Skating, men, single
2
Hans Gerschwiler
1948
Skating, men, single
3
Edi Rada
...
...
...
...
1948
Swimming, women, 100m backstroke
3
Georges Vallerey
Select one option from the list Report a typo
year, discipline, place, full_name
year, discipline, (place + 1) as "place", full_name
year, discipline, place + 1, full_name
- Assistant
The correct option to generate the result shown is:
year, discipline, place, full_name
- User
A table is defined by the following statement:
CREATE TABLE weather ( hour INTEGER, temperature INTEGER, feels_like INTEGER, wind_speed INTEGER, wind_direction VARCHAR(2), wind_gusts INTEGER, humidity DECIMAL(3,2), phenomena VARCHAR(50), pressure INTEGER );
Write a query that selects all the data related to the wind and corresponding hour. Columns in your query must go in alphabetical order.
Write an SQL statement Report a typo HINT by avatar Igor Ch Manually arrange alphabetically
- Assistant
SELECT hour, wind_direction, wind_gusts, wind_speed FROM weather ORDER BY hour;