Solution and walkthrough of leetcode database problem 262: Trips and Users. I'm using MySQL but this solution should work in any SQL dialect such as PostgreSQL SQL Server, etc. Link to the problem: https://leetcode.com/problems/trips-and-users/
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.