Skip to content

Instantly share code, notes, and snippets.

Created December 22, 2016 09:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
#lấy toàn bộ các cột báo cáo
SELECT * FROM [A1:U42000]
SELECT [Order ID],[Order Date],[Order Quantity],[Order Priority] ,[Customer Name] FROM [A1:U42000] WHERE [Order Priority] = "High"
SELECT [Order ID],[Order Date],[Order Quantity],[Customer Name] FROM [A1:U42000] WHERE [Order Priority] = "High" AND [Customer Name] = "Annie Cyprus"
SELECT [Order ID],[Order Date],[Order Quantity],[Customer Name],[Ship Mode] FROM [A1:U42000] WHERE [Order Priority] = "High" AND [Ship Mode] LIKE "%Air"
SELECT [Order Quantity],[Sales],[Profit],[Sales]*0.1 as [Thue 10%] FROM [A1:U42000]
SELECT [Customer Name],[Region],[Order Priority] FROM [A1:U42000] WHERE [Order Priority] LIKE "High"
SELECT [Customer Name],[Region],[Order Priority],[Ship Mode] FROM [A1:U42000] WHERE [Order Priority] LIKE "High" AND [Ship Mode] LIKE "%AIR"
#Trong ADO SQL, dấu % sử dụng kèm với toán tử LIKE là dấu *
SELECT MAX([Profit]) as [Max Profit cua Carlos] FROM [A1:U42000] WHERE [Customer Name] LIKE "Carlos%"
SELECT [Order Date],[Customer Name] FROM [A1:U42000] WHERE [Order Date]>=#17/06/2011# ORDER BY [Order Date] DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment