Question: Using the data tables attached, please provide the SQL query for each question. What is the customer information for customers who live in Los Angeles?

Using the data tables attached, please provide the SQL query for each question.

  1. What is the customer information for customers who live in Los Angeles?
  2. What is the average value of all approved claims?
  3. Two parts:
    1. What are the top 5 policies by claim count?
    2. What are the top 5 policies by total claim amount?
  4. What is the vehicle identification number (VIN) and model year for cars with a policy expiration date after October 31, 2019 and a model year of 1985 or earlier?
  5. List the cities in New York or New Jersey where customers who have policies with NO claims live.

    HINT: Do not list a city more than once, even if multiple customers live in that city.

BONUS: What is the average deductible by claim status for claims with a date in January 2019 OR claims for vehicles manufactured by Ford?

Using the data tables attached, please provide the SQL query for eachquestion. What is the customer information for customers who live in LosAngeles? What is the average value of all approved claims? Two parts:What are the top 5 policies by claim count? What are thetop 5 policies by total claim amount? What is the vehicle identificationnumber (VIN) and model year for cars with a policy expiration date

Grid *ST Text E claim Enter a SQL expression to filter results (use Ctrl+Space) ADS claim_number TH 123 amount TI claim_date TI ABC policy_number TI 123 status 1 011904756-X 3,924 2018-09-29 7 518967504-1 2 640090895-1 18,212 2018-12-25 625989557-7 722686195-X 13,141 2018-10-14 7 252480462-3 4 281158537-0 5,583 2018-06-25 009526820-0 5 413007080-0 8,977 2019-05-16 7 326876454-1 6 491153365-X 12,860 2018-11-07 337035745-3 7 565071283-2 13,056 2019-03-23 144429367-2 8 515302178-5 17,665 2019-05-14 408376534-8 9 825577585-4 7,787 2019-04-04 7 271694660-4 10 355337367-9 14,023 2019-03-26 7 859932953-7 11 077971001-0 639 2019-04-25 7 558145685-2 12 140354879-X 2,307 2018-07-03 6 358573812-5 13 764248818-1 4,806 2018-08-22 139427079-8 14 713938793-1 5,253 2019-03-06 743065695-1 15 378698442-5 15,557 2018-10-20 7 443626967-1 16 915934411-3 1,441 2018-12-14 003513709-6 17 551566602-X 26,887 2019-03-12 089787281-9 18 363813291-9 38,854 2019-09-14 7364349606-0 19 410091436-9 20,852 2019-03-21 467903447-5 20 141938922-X 12,899 2018-12-31 7 076313326-4 21 350033299-4 8,473 2019-02-26 % 773914053-8 22 597217493-6 16,910 2018-11-29 7 252480462-3 23 403102200-X 13,811 2018-09-14 027603510-0 24 375296218-6 7,862 2018-08-24 % 834638970-1 25 796242856-2 16,419 2018-05-12 % 876109570-2 341362038-X 11.809 2019-08-08 7447771395-9 Record Pe 26 Hord Text customer Enter a SQL expression to filter results (use Ctrl+Space) Ag customer_number TI ABC first_name T: ADC last_name 1 1001-01 Kissie Gillham 2 1001-02 Randy Beauchop 3 1001-03 Nicolais Hardey 4 1001-04 Gerrie Kurton 5 1001-05 Nerte Husher 6 1001-06 Giles Olliar 7 1001-07 Winnie Boscher 8 1001-08 Virgil Odam 9 1001-09 Jeri Eliesco 10 1001-10 Erik Folks 11 1001-11 Ced Coventry 12 1001-12 Vera Hachard 13 1001-13 Irvin Parrott 14 1001-14 Trix Simeons 15 1001-15 Major Frankcomb 16 1001-16 Lezley Eliyahu 17 1001-17 Dulcea Such 18 1001-18 Jacquette 19 1001-19 Amitie Igglesden 20 1001-20 Anastasia Meikle 21 1001-21 Rutger Huburn 22 1001-22 Ruth Ludron 23 1001-23 Rosaline Jeffes 24 1001-24 Ethelind Gribbins 25 1001-25 Stephi Aliman - 26 1001-26 Pier Mosdall Jell 1 2 3 4 5 6 7 8 9 10 11 12 13 13 car_type_id TH ADC car_make Acura 2 Acura 3 Acura 4 Acura 5 Acura 6 Acura 7 Alfa Romeo 8 Aston Martin 9 Aston Martin 10 Aston Martin 11 Aston Martin 12 Aston Martin 13 Audi 14 Audi 15 Audi 16 Audi 17 Audi 18 Audi 19 Audi 20 Audi 21 Audi 22 Audi 23 Audi 24 Audi 25 Audi 26 Audi T: ABC car_model CL Integra MDX NSX RL TL 164 DB9 DBS Rapide Vantage Virage 80 90 100 80/90 14 15 16 17 A5 18 19 A8 20 21 22 23 24 25 26 Allroad Coupe GT Q5 riolet RS4 S4 S5 ABS policy number TI 123 policy_limit T: 123 deductible TI 563086016-X 40,354 1,621 911908937-6 9,941 986 265892758-4 48,275 931 186291280-7 18,641 1,435 975165266-9 49,120 1,444 218665052-5 23,272 1,410 490144125-6 47,074 1,007 832193816-7 33,761 1,856 005094612-9 48,525 1,667 667166578-8 32,283 1,200 310786369-6 21,032 904 974979935-6 7,283 1,270 009646921-8 4,366 755 088438275-3 49,612 595 908210179-3 2,813 1,851 206383023-1 39,065 1,160 971366039-0 9,824 1,647 969601004-4 23,212 628 931079650-2 31,696 563 959077273-0 29,636 928 992134918-X 28,958 716 366819510-2 47,524 580 321368940-8 5,895 1,367 711516195-X 25,847 1,433 792669349-9 34,899 899 233955697-X 28,551 1,631 778862681-0 44 750 613 expiration_date TI ABC customer_number T: ABC vin 2020-01-08 1003-67 * 1J4AA2D11AL229135 2019-03-06 1001-56 WBA3V7C56EJ990309 2019-11-29 1003-27 1C6RD6PT8CS135127 2019-06-14 1002-29 JN8AZ2KR4ET884472 2019-03-26 1004-97 1GDO2ZCG2DZ551101 2019-07-22 7 1004-57 JN8AE2KPXD9779814 2019-02-24 1002-12 7 WBA4A7C52FD879613 2019-04-14 1004-68 KNADH5A3XA6443543 2019-08-04 71002-25 * WAUFFBFLOBN696481 2019-05-01 % 1004-20 + 3D7TP2CT4BG930076 2019-09-19 71003-67 SAJWA1CB9BL282832 2019-01-15 % 1001-29 SCBBP9ZA2DC856931 2019-09-12 1003-76 WDDGF5EB6AA317237 2019-03-18 1003-69 KMHFH4JG6FA970858 2019-08-06 1002-96 WAUFFBFL5BA546406 2019-08-25 71002-94 WBAYB6C55ED899121 2019-06-02 71001-55 61FTFW1E87AF054047 2019-03-06 1003-79 WA1LMAFE4AD560179 2019-10-03 1004-81 WAUDT74F55N632970 2020-01-07 % 1001-22 19UYA41743A445893 2019-03-28 71002-66 JHMGE8G3XCS722789 2019-05-28 71001-67 + 3MZBM1U76EM463093 2019-08-22 % 1004-34 JTDKDTB33E1156444 2019-02-03 7 1004-27 KNAFU6A23A5895146 2019-09-27 71003-15 + 1G6DX67D280622963 2019-05-28 % 1003-74 KL4CJHSB4EB722410 2019-05-02 A 1002-61 SEPVK1751FRAnnang I Grid FB status Enter a SQL expression to filter results (use Ct 127 status_id TI ABC status T: 1 1 pending 2 2 approved 3 3 denied AB vin vehicle Enter a SQL expression to filter results (use Ctrl+Space) TI 123 model_year T: 123 car_type_id TE 1 1J4AA2D11AL229135 1,995 207 2 WBA3V7C56EJ990309 2,012 453 3 1C6RD6PT8CS135127 2,007 118 % 4 JN8AZ2KR4ET884472 1,995 98 5 1GDO2ZCG2D2551101 2,002 47 6 JN8AE2KPXD9779814 2,005 291 7 WBA4A7C52FD879613 2,011 235 8 KNADH5A3XA6443543 2,002 132 % 9 WAUFFBFLOBN696481 2,012 80 10 3D7TP2CT4BG930076 1,992 154 11 SAJWA1CB9BL282832 2,008 465 12 SCBBPOZA2DC856931 1,950 221 13 WDDGF5EB6AA317237 [NULL] 219 14 KMHFH4JG6FA970858 2,000 171 15 WAUFFBFL5BA546406 2,001 452 16 WBAYB6C55ED899121 1,993 394 17 1FTFW1E87AF054047 1,996 132 18 WA1LMAFE4AD560179 2,006 101 19 WAUDT74F55N632970 1,991 322 20 19UYA41743A445893 2,008 511 21 JHMGESG3XCS722789 2,007 287 % 22 3MZBM1U76EM463093 1,996 462 % 23 JTDKDTB33E1156444 1,998 455 2 24 KNAFU6A23A5895146 2,012 316 25 166DX67D280622963 1,988 (NULL) KL4CJHSB4EB722410 2,008 501 SEPVK1E51ERAnnang 2004 24 A 26 27

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!