Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Information about customers is stored in the CUSTOMER table. Write a query to print the ID, FIRST_NAME, and LAST_NAMES of the customers whose combined name

Information about customers is stored in the CUSTOMER table. Write a query to print the ID, FIRST_NAME, and LAST_NAMES of the customers whose combined name length, i.e, the sum of the length of the FIRST_NAME and LAST_NAME, is less than 12. The IDS and names should be printed in the ascending order of the combined name length. If two or more customers have the same combined name length, sort the result in lexicographical order of the full names (FIRST_NAME + LAST_NAME without a space between, and ignoring case). If two or more customers have the same full name, sort those results by 1D, ascending.Input FormatCUSTOMER

  
 

Name ID Type Description Integer FRST NAME String LAST NAME String A customer ID in the inclusive range [1, 1000). This field is the primary key. First name of the customer. This field contains between 7 and 100 characters (inclusive). Last name of the customer. This field contains between 7 and roocharacters (inclusive). COUNTRY String The country of the customer. CREDIT_LMITFloat The credit limit of the customer. Output format The result should contain the ID, FIRST NAME, and LAST NAME of the customers whose combined name length, ie, the sum of the length of the FIRST NAME and LASTINAME, is less than 12. The 10s and names should be printed in the ascending order of the combined name length. If two or more customers have the same combined name length, then sort the result in lexicographical order by full name. if two or more. customers have the same full name, sort the result by ascending order by 1D

Step by Step Solution

3.31 Rating (172 Votes )

There are 3 Steps involved in it

Step: 1

Answer SELECT ID FIRSTNAME LASTNAME ... blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation and Management

Authors: Carlos Coronel, Steven Morris

11th edition

9781305323230, 1285196147, 1305323238, 978-1285196145

More Books

Students explore these related Electrical Engineering questions

Question

Implement the method contains() for HashST.

Answered: 3 weeks ago