Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql cross apply vs join

SELECT M.ID,M.NAME,D.PERIOD,D.QTY
FROM MASTER M
INNER JOIN
(
    SELECT TOP 2 ID, PERIOD,QTY 
    FROM DETAILS D      
    ORDER BY CAST(PERIOD AS DATE)DESC
)D
ON M.ID=D.ID
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql show create db 
Sql :: mysql trim characters 
Sql :: remove duplicates mysql 
Sql :: update statement postgres 
Sql :: sql recherche nom prenom 
Sql :: order by postgres 
Sql :: Oracle SQL join three tables and group by column 
Sql :: what are the data types 
Sql :: was not locked with LOCK TABLES 
Sql :: get substract count sql 
Sql :: cannot connect to mysql server 10060 
Sql :: sql queries practice 
Sql :: Join multiple table by MySQL 
Sql :: psql view databases 
Sql :: how to add amount between date in sql 
Sql :: connect mysql 
Sql :: sql insert all 
Sql :: mysql_union 
Sql :: limit rows after order by oracle 
Sql :: create view in oracle sql 
Sql :: sql query examples 
Sql :: UPDATE SQL RAHULDEV 
Sql :: swiftui onappear only once 
Sql :: postgres type equivalent to timespan c# 
Sql :: sql tablo hangi sp de 
Sql :: SQL ANY and ALL Operators 
Sql :: compare subqueries oracle 
Sql :: Template MySQL Zabbix agent 
Sql :: radius search with point data in mysql 
Sql :: update multiple columns in postgres 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =