Question: Given a table events with the following structure: create table events ( sensor _ id integer not null, event _ type integer not null, value
Given a table events with the following structure:
create table events
sensorid integer not null,
eventtype integer not null,
value float not null,
time timestamp not null,
:
Write an SQL query that returns a set of all sensors sensorsid with. the number of different event types eventtype registered by each of them, ordered by sensorid in ascending order
For example, given the following data:
sensorid eventtype value time
::
::
::
::
::
your query should return the following rowset:
sensorid types
the names of the columns in the rowset dont matter, but their order does
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
