Skip to content

Commit fb237d4

Browse files
authored
Add SQL queries for customer operations
Added various SQL queries for customer data retrieval and manipulation.
1 parent 1a20acf commit fb237d4

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

‎Example-File/cwpc_25_4_26,sql‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,31 @@ where customernumber = 131;
113113
select * from customers where customernumber = 131;
114114

115115

116+
-- 2 May 2026
117+
-- delete
118+
use classicmodels;
119+
show tables;
120+
select * from offices;
121+
-- SET SQL_SAFE_UPDATES = 0;
122+
-- delete from offices where officecode = 1;
123+
124+
-- like
125+
select * from customers where customername like "at%";
126+
select * from customers where customername like "%e";
127+
select * from customers where customername like "%gifts%";
128+
129+
-- top(limit)
130+
select * from customers limit 5;
131+
132+
-- order by
133+
select * from customers order by creditlimit asc limit 10;
134+
select * from customers order by creditlimit desc limit 10;
135+
select * from customers order by contactfirstname desc limit 10;
136+
select * from customers order by contactfirstname asc limit 10;
137+
138+
-- distinct keyword
116139

140+
select distinct city from customers;
117141

118142

119143

0 commit comments

Comments
 (0)