Search
 
SCRIPT & CODE EXAMPLE
 

SQL

Inner join - to join 3 tables - https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-inner-join/

SELECT
	c.customer_id,
	c.first_name customer_first_name,
	c.last_name customer_last_name,
	s.first_name staff_first_name,
	s.last_name staff_last_name,
	amount,
	payment_date
FROM
	customer c
INNER JOIN payment p 
    ON p.customer_id = c.customer_id
INNER JOIN staff s 
    ON p.staff_id = s.staff_id
ORDER BY payment_date;
Code language: SQL (Structured Query Language) (sql)
Comment

PREVIOUS NEXT
Code Example
Sql :: dual in db2 
Sql :: MySQL INSERT IGNORE Statement 
Sql :: activate log mysql 
Sql :: sql show table info 
Sql :: delete a temporary table mysql 
Sql :: c# sqldatareader to list 
Sql :: rename table sqlite 
Sql :: insert array postgresql 
Sql :: ERROR 3948 (42000): Loading local data is disabled; this must be enabled on both the client and server sides 
Sql :: enter mysql command line 
Sql :: SQL Modify Column in a Table -PostgreSQL 
Sql :: AND OR NOT operators sql 
Sql :: error code 1215 cannot add foreign key constraint 
Sql :: how to add month in update sql 
Sql :: get yesterday date ISO in psql 
Sql :: get count of null in column sql 
Sql :: postgresql float 2 decimal places 
Sql :: user_dependencies 
Sql :: combine 2 columns search query mysql 
Sql :: restore postgresql database from dump file 
Sql :: mysql dump with table query 
Sql :: postgre insert select 
Sql :: sql count how many times a value appears 
Sql :: show table mysql 
Sql :: mysql case when in select 
Sql :: sql create tabel with primary key auto_increment code 
Sql :: import mysql database command line linux 
Sql :: sql inserted 
Sql :: mysql on duplicate key ignore 
Sql :: postgres create multiple index 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =