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 ...See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started