FastPrepRetrieve Every Student Record
Problems/Retrieve Every Student Record

Retrieve Every Student Record

LSEG logoLSEG● EasyFULLTIMEONSITE INTERVIEW

Updated Sep 2024

QuestionConstraints

Problem statement

Source note: The report mentions basic MySQL data retrieval but gives no query, schema or output. This exercise matches that retrieval capability at about 40%; the table and result details are practice assumptions.

For this exercise, assume a table students with columns student_id and student_name. The ID is unique; a name may be NULL.

Write a query that returns every row with exactly these two columns in this order: student_id, student_name. Do not filter rows, combine records, or remove students who share the same name. Preserve NULL values. Any row order is accepted.

Table schema

MySQLPostgreSQLPandas

Use the same input data with any supported language. Open the Schema tab in the editor to see the generated SQL setup or Pandas DataFrames.

students

An authored practice roster for a basic retrieval query.

ColumnTypeNullableDescription
student_idPKIntegerNo—
student_nameTextYes—

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
student_idIntegerNo—
student_nameTextYes—

Row order: any order is accepted. Numeric tolerance: 0.

Constraints

  • The students table contains between 0 and 10000 rows.
  • student_id is a unique non-null integer.
  • student_name is text and may be NULL.

More LSEG interview questions

  • Recover the Initial Mango PileONSITE INTERVIEW · Seen Jul 2025
  • Implement Stack Push and Pop OperationsONSITE INTERVIEW · Seen Feb 2025
  • Count Times Using at Most Two DigitsOA · Seen Jul 2025
  • Maximum Sum of Exactly Three Non-Adjacent ElementsOA · Seen Jul 2025
  • Maximum Word Count in a SentenceOA · Seen Jul 2025
  • Minimum Digit Swaps for the Smallest DifferenceOA · Seen Jul 2025
  • Smallest String After at Most One DeletionOA · Seen Jul 2025
  • Delete One Digit 5 to Maximize the NumberOA · Seen Feb 2025
  • Three-Part Partition with Minimum Largest RangeOA · Seen Feb 2025
  • Transform a String with at Most One OperationOA · Seen Feb 2025

Similar questions at other companies

  • Delete Duplicate Employee RecordsInfosys · ONSITE INTERVIEWInfosys interview questions
  • Records Created or Updated in a Time WindowPelatro · ONSITE INTERVIEW
  • Top Ten Employee SalariesSolytics Partners · ONSITE INTERVIEW
  • Latest New JobSphere · ONSITE INTERVIEW
  • Employees Whose Manager Left the CompanyZS · ONSITE INTERVIEWZS interview questions
  • Employees Above Average SalaryJP Morgan Chase · ONSITE INTERVIEWJP Morgan Chase interview questions
  • Combine Winner and Loser NamesAmazon · ONSITE INTERVIEW
  • Conditionally Insert or Update RecordsKlaviyo · ONSITE INTERVIEWKlaviyo interview questions
  • Employees with Matching DepartmentsAMD · ONSITE INTERVIEWAMD interview questions
  • New-User Devices That Opened an AppMicrosoft · ONSITE INTERVIEWMicrosoft interview questions

Interview reports that mention this question

  • LSEG Graduate Technology OA and Interviews: 7 Experiences
All LSEG interview questionsSee LSEG hiring insights