-
Notifications
You must be signed in to change notification settings - Fork 1
/
queries.sql
56 lines (49 loc) · 4.95 KB
/
queries.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Example: Delete a PR Agencies's Sample Requests
* Note: a method had been added to AdminController for this process.
*/
select id from sample_request where pr_agency_id = '68';
delete from booking_status where sample_request_id IN(712,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,791,792,793,794,795,796,797,798,799,800,801);
delete from searchable_item_sample_requests where sample_request_id IN(712,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,791,792,793,794,795,796,797,798,799,800,801);
update sample_request set shipping_out_id = null where id IN(712,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,791,792,793,794,795,796,797,798,799,800,801);
update sample_request set shipping_return_id = null where id IN(712,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,791,792,793,794,795,796,797,798,799,800,801);
delete from shipping_event where sample_request_id IN(712,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,791,792,793,794,795,796,797,798,799,800,801);
delete from sample_request where id IN(712,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,791,792,793,794,795,796,797,798,799,800,801);
/*
* Delete all Sample Requests
*/
delete from booking_status;
delete from searchable_item_sample_requests;
update sample_request set shipping_out_id = null;
update sample_request set shipping_return_id = null;
delete from shipping_event;
delete from sample_request;
/*
Find all samples for a brand and collection creatd after a certain date
*/
select * from searchable_item where brand_id = '45' and type_id = '2'
and brand_collection_id = '168' and date_created > '2017-04-03 17:33:50';
ALTER TABLE user AUTO_INCREMENT = 60;
INSERT INTO color (name) VALUES ('baby blue') , ('blue light') , ('beige') , ('bicolour') , ('black') , ('bleu') , ('blue') , ('bordeaux'),
('bright') , ('bronze') , ('brown') , ('brown light') , ('burgundy') , ('camel') , ('cobalt') , ('cognac') , ('colorful'),
('coral') , ('cream') , ('duotone') , ('fuschia') , ('glitter') , ('gold') , ('gray') , ('green') , ('grey') , ('ivory') , ('jaune'),
('khaki') , ('lavendar') , ('lilac') , ('lime') , ('metallic') , ('monochrome'),
('multicolour') , ('mustard') , ('navy blue') , ('noir') , ('nude') , ('orange') , ('pastel') , ('pearl'),
('pink') , ('powder') , ('purple') , ('red') , ('rust') , ('salmon') , ('shine') , ('silver') , ('transparent'),
('turquoise') , ('white') , ('yellow');
/*
sample types
*/
INSERT INTO sample_type (name) VALUES ('bag') , ('babouches') , ('bandana') , ('beads') , ('belt') , ('bermuda') , ('bikini') , ('blazer') , ('blouse') , ('bodice') , ('boots') , ('boyfriend jeans') , ('bomber jacket') , ('boots') , ('bra') , ('bracelet') , (
'braces') , ('bustier') , ('button') , ('cap') , ('cape') , ('cardigan') , ('claudine') , ( 'clutch bag') , ('coat') , ('cocktail dress') , ('collar') , ('corsage') , ('corset') , (
'costume') , ('crocs') , ('crop top') , ('culotte') , ('dress') , ('dress on pants') , ('diamond') , ('dressing gown') , ('dungarees') , ('earring') , ('fan') , (
'feather') , ('flared jeans') , (
'gilet') , ('glasses') , ('glove') , ('gown') , ('handbag') , ('handkerchief') , ('hat') , ('headband') , ('heels') , ('hoodie') , ('jacket') , ('jeans') , ('jeggings') , ('jogging') , ('jumper') , (
'jumpsuit') , ('jupe') , ('kerchief') , ('kilt') , ('kimono') , ('knots') , ('laysuit') , ('legging') , ('lingerie') , ('loafers') , ('mao collar') , ('mariniere') , ('necklace') , ('necktie') , (
'nightgown') , ('nightwear') , ('overalls') , ('oxford') , ('pajama') , ('panties') , ('pants') , ('parka') , (
'pantyhose') , ('patch') , ('patchwork') , ('pencil skirt') , ('pearl') , ('perfecto') , ('peter pan collar') , ('platform boots') , ('playsuit') , ('pocket') , ('polo') , (
'pompom') , ('poncho') , ('puffer') , ('pullover') , ('pyjama') , ('raincoat') , ('reefer') , ('ribbon') , ('ring') , ('satchel') , ('sandal') , ('scarf') , ('shawl') , ('shoes') , ('shirt') , (
'shirt dress') , ('shorts') , ('skirt') , ('skirt dress') , ('sleeve') , ('sleeveless') , (
'slip') , ('slipper') , ('slip dress') , ('smoking') , ('socks') , ('stilletos') , ('suit') , ('sunglasses') , ('sweater') , ('sweatpants') , (
'sweatshirt') , ('swimsuit') , ('tank top') , ('teeshirt') , ('tennis') , ('tie') , ('tights') , ('top') , ('trainers') , ('trench') , ('trenchcoat') , ('trousers') , ('tunic') , (
'turtleneck') , ('tuxedo') , ('underwear') , ('veil') , ('vest') , ('waistcoat') , ('watch') , ('zip');