1 00:00:01,040 --> 00:00:03,510 i'm ok taxes 2013 shoot or ooze 2 00:00:03,509 --> 00:00:07,729 in this video we will be creating another union query 3 00:00:07,730 --> 00:00:11,320 as you did in the previous video I'm so gonna play along 4 00:00:11,320 --> 00:00:15,009 funny imploded on a section website on the next 20-30 5 00:00:15,009 --> 00:00:18,719 DB 46 in a note from that but put up 6 00:00:18,719 --> 00:00:25,129 login with password okay in previous video 7 00:00:25,129 --> 00:00:30,268 said recreates its query booking extra charges Union 8 00:00:30,268 --> 00:00:34,350 and we're gonna be crackin other union carried a scanner 9 00:00:34,350 --> 00:00:39,210 union this and a select query and the reason we wanna do you guys you wanna 10 00:00:39,210 --> 00:00:39,628 put 11 00:00:39,628 --> 00:00:44,488 all the charges which is basically what this is alongside 12 00:00:44,488 --> 00:00:49,349 who love the payments which is here today which I hit a limb was payments 13 00:00:49,350 --> 00:00:52,800 hocker 14 00:00:52,799 --> 00:00:56,729 alright so were disclosed that nets 15 00:00:56,729 --> 00:00:59,779 closed I Post Oak Creek 16 00:00:59,780 --> 00:01:03,689 creed is eyeing and we need 17 00:01:03,689 --> 00:01:07,908 table ambushed payments for the moment miss a thing 18 00:01:07,909 --> 00:01:13,840 term for a given age you 19 00:01:13,840 --> 00:01:18,560 in which case in which side the dress code for table in police 20 00:01:18,560 --> 00:01:22,409 your booking ID we do your booking ID 21 00:01:22,409 --> 00:01:29,409 your payment eight-week to weekend amount as well 22 00:01:30,609 --> 00:01:34,629 chasers go for I'll 23 00:01:34,629 --> 00:01:39,140 clicking here and 24 00:01:39,140 --> 00:01:42,939 longer to do is ludicrous cram their creative juices as well 25 00:01:42,938 --> 00:01:47,258 got a builder and coldest 26 00:01:47,259 --> 00:01:51,280 booking high-t_ semicolon he cools 27 00:01:51,280 --> 00:01:54,460 table invoices dot 28 00:01:54,459 --> 00:01:58,390 King I DSK so leverage is taking 29 00:01:58,390 --> 00:02:02,590 the filter is booking ID underscore escapes foreign key table invoices and 30 00:02:02,590 --> 00:02:05,590 run it splendid booking ID 31 00:02:05,590 --> 00:02:09,110 a.m. next thing we want is d 32 00:02:09,110 --> 00:02:12,250 day now I cannot realistically 33 00:02:12,250 --> 00:02:16,360 payment a on change the field so mccauley Swan 34 00:02:16,360 --> 00:02:20,530 trends action day she's 35 00:02:20,530 --> 00:02:25,259 table invoice payments doc a 36 00:02:25,259 --> 00:02:31,409 payment date so again we've got 37 00:02:31,409 --> 00:02:34,560 that I'm 38 00:02:34,560 --> 00:02:38,180 K next thing 39 00:02:38,180 --> 00:02:45,180 is I just want dished extra column on its next column to say payment so only 40 00:02:45,199 --> 00:02:45,509 for 41 00:02:45,509 --> 00:02:48,639 quite certain and then 42 00:02:48,639 --> 00:02:53,909 and quotation marks payment cipher run that 43 00:02:53,909 --> 00:02:57,400 who dis repeat payment down and 44 00:02:57,400 --> 00:03:01,090 amount paid this just 45 00:03:01,090 --> 00:03:06,739 a.m. who dis one amount she's 46 00:03:06,739 --> 00:03:10,200 table invoice payment talk amount paid 47 00:03:10,199 --> 00:03:15,439 so came from that okay 48 00:03:15,439 --> 00:03:20,219 you pretty good now if we open up the query we made in the previous video 49 00:03:20,219 --> 00:03:23,609 we had the the ID we had today 50 00:03:23,610 --> 00:03:27,299 Brett texting where the charge and this one we've got 51 00:03:27,299 --> 00:03:31,319 the ID to take some texans charge so there that means we can actually put 52 00:03:31,318 --> 00:03:32,030 them together 53 00:03:32,030 --> 00:03:35,449 so what we now wanna to 54 00:03:35,449 --> 00:03:40,798 is I am we sing 55 00:03:40,799 --> 00:03:45,969 Minister create 56 00:03:45,969 --> 00:03:49,900 curry design can we just want 57 00:03:49,900 --> 00:03:55,039 queries we won't weary you can trust you next charges 58 00:03:55,039 --> 00:03:59,259 now 59 00:03:59,259 --> 00:04:02,658 sign could ask your views here to gonna take 60 00:04:02,658 --> 00:04:06,250 selects a min takeover query one 61 00:04:06,250 --> 00:04:09,979 prevent SQL View Lee 62 00:04:09,979 --> 00:04:13,518 semi code on and its union cool 63 00:04:13,519 --> 00:04:16,560 has to turn control V Nonna 64 00:04:16,560 --> 00:04:22,620 for their work together now again we want to order by transaction day 65 00:04:22,620 --> 00:04:26,709 so perfect SQL View to get something so long 66 00:04:26,709 --> 00:04:30,599 and order by and 67 00:04:30,600 --> 00:04:34,770 table well strike transaction date 68 00:04:34,769 --> 00:04:40,279 process and work give it a go 69 00:04:40,279 --> 00:04:43,859 has it worked it worked has indeed worked 70 00:04:43,860 --> 00:04:48,000 has indeed world excellent and 71 00:04:48,000 --> 00:04:53,220 so to save that cooler one weary 72 00:04:53,220 --> 00:04:56,850 costs payments 73 00:04:56,850 --> 00:05:01,030 Union 74 00:05:01,029 --> 00:05:07,079 hope Kb so yep that's that list carrot Creek second-grader it anymore 75 00:05:07,079 --> 00:05:12,258 anger that on alrighty 76 00:05:12,259 --> 00:05:17,180 a.m. yessir so you can create union query using another union query 77 00:05:17,180 --> 00:05:21,050 to might be slightly more sophisticated way of doing that bob for doing it like 78 00:05:21,050 --> 00:05:22,050 this 79 00:05:22,050 --> 00:05:25,169 taking the a.m. 80 00:05:25,168 --> 00:05:28,589 select think revoking extras union because then if I need to make a change 81 00:05:28,589 --> 00:05:30,299 to 82 00:05:30,300 --> 00:05:34,840 anything in this part the query I don't actually need to do anything to square 83 00:05:34,839 --> 00:05:35,918 just go 84 00:05:35,918 --> 00:05:39,939 query cost payments Union some popular consul separating out 85 00:05:39,939 --> 00:05:43,180 so I'm for that reason I would prefer to do it like this 86 00:05:43,180 --> 00:05:48,780 a.m. and I said death us that so we've got essentially 87 00:05:48,779 --> 00:05:52,849 all of the information and that we need so your sis 88 00:05:52,850 --> 00:05:56,100 my phone hang around okay britt in thank you for watching a she see you 89 00:05:56,100 --> 00:05:56,789 in next video