Search
 
SCRIPT & CODE EXAMPLE
 

SQL

Oracle SQL join three tables and group by column

select
  t.name, 
  count(distinct r.idc) as number_of_classes
from
  teacher t
join 
  reserve r on r.idt = t.idt
join
  class c on c.idc = r.idc
group by 
  t.name
Comment

PREVIOUS NEXT
Code Example
Sql :: what is table in sql 
Sql :: mysql shell set time_zone 
Sql :: what are the data types in sql 
Sql :: mql4 sleep 
Sql :: was not locked with LOCK TABLES 
Sql :: Write an SQL query to determine the 5th highest salary without using TOP or limit method. 
Sql :: incorrect datetime value sql table error 1292 
Sql :: create database with hyphen sign mysql 
Sql :: update table sql 
Sql :: how to start postgresql laravel 
Sql :: mysql null 
Sql :: right join 
Sql :: mysql workbench primary key 
Sql :: connect mysql 
Sql :: what is auto increment in sql 
Sql :: merge in sql 
Sql :: is firebase nosql 
Sql :: sql server enterprise 
Sql :: sql year 
Sql :: if mysql UPDATE 
Sql :: mssql xml 
Sql :: Which SQL statement would you use to remove a view called EMP_DEPT_VU from your schema? 
Sql :: mysql select all and rename one 
Sql :: sqlite3 get data from table c 
Sql :: difference between ltrim and rtrim in sql server 
Sql :: insert statement with $1 
Sql :: cassandra query example 
Sql :: how to create a new shema using query languaage 
Sql :: oracle alter database open restricted session 
Sql :: xampp increame mysql speed 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =