Skip to content

Commit 1c17a0f

Browse files
authored
Update 8_cwpc_9.sql
1 parent 16f84e9 commit 1c17a0f

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

‎Example-File/8_cwpc_9.sql‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,4 +179,57 @@ where country = "USA";
179179
select sum(creditlimit) from customers
180180
where country = "USA";
181181

182+
-- date : 4 - 12 - 2025
183+
-- update query
184+
-- delete
185+
-- like
186+
-- top (limit)
187+
-- order by
188+
-- group by
189+
190+
use classicmodels;
191+
192+
select * from customers;
193+
194+
update customers
195+
set creditlimit = 51000 where customerNumber = 103;
196+
197+
select * from customers where customerNumber = 103;
198+
199+
-- delete from customers
200+
-- where customernumber = 103;
201+
202+
select * from customers where customername like "a%";
203+
select * from customers where customername like "%gifts%";
204+
select * from customers where customername like "%g%";
205+
206+
select * from customers where customername like "%e";
207+
208+
-- limit
209+
210+
select * from customers limit 10;
211+
212+
-- order by
213+
214+
select * from customers order by creditlimit asc limit 10;
215+
select * from customers order by creditlimit desc limit 10;
216+
217+
218+
select * from customers order by customername asc ;
219+
select * from customers order by customername desc ;
220+
221+
222+
-- group by
223+
224+
select country from customers group by country;
225+
226+
select country,count(country) as total_customer from customers group by country;
227+
228+
229+
230+
231+
232+
233+
234+
182235

0 commit comments

Comments
 (0)