Рет қаралды 818
Write a solution to find the IDs of the users who visited without making any transactions and the number of times they made these types of visits.
Return the result table sorted in any order.
transaction_id is column with unique values for this table.
This table contains information about the transactions made during the visit_id.
Problem link - leetcode.com/p...
Solution -
select v.customer_id, count(*) as count_no_trans
from Visits v
left join
Transactions t
on
v.visit_id = t.visit_id
where t.transaction_id is null
group by customer_id
#leetcodesql #FAANG #SQLinterviewQuestions
⭐Hashtags⭐
#sql #sqlinterviewquestions #sqlinterviewquestionsandanswers #sqlquestions
Related keywords
sql interview questions
sql interview questions and answers
sql interview
sql questions and answers
top sql questions
sql interview questions for freshers
sql interview questions for beginners
sql interview questions for experienced
intermediate level sql interview questions
sql queries interview questions and answers
sql interview preparation
sql basic questions
sql questions
sql query
interview questions sql