Placements | HackerRank | MSSQL

The Downside On this SQL downside, we’re given three tables: College students, Buddies, and Packages. The College students desk accommodates two columns: ID (the scholar’s ID), and Identify (the scholar’s identify). The Buddies desk accommodates two columns: ID (the scholar’s ID), and Friend_ID (ID of the ONLY finest good friend of the scholar). The Packages […]

Bank Account Summary II | LeetCode | MSSQL

The Drawback Desk: Customers Column Identify Kind account int title varchar account is the first key for this desk. Every row of this desk incorporates the account variety of every person within the financial institution. There will likely be no two customers having the identical title within the desk. Desk: Transactions Column Identify Kind trans_id […]

Biggest Single Number | LeetCode | MSSQL

The Downside Within the MyNumbers desk, now we have the next schema: There isn’t a major key for this desk. It might include duplicates. We’re tasked with writing an SQL question to report the biggest single quantity (a quantity that seems solely as soon as). If there isn’t any single quantity, the question ought to […]

Employees Earning More Than Their Managers | LeetCode | MSSQL

The Downside Given an organization’s Worker desk, we’re tasked to put in writing an SQL question to establish the workers who earn the next wage than their managers. Every row within the Worker desk gives the worker’s ID, title, wage, and the ID of their supervisor. Desk: Worker Column Title Sort id int title varchar […]