#109 SQL Queries for Transactions

Companies:
Unknown company
Themes:
SQLJoinsAggregationPractice

The following tables are given:

create table transactions (
    id uuid primary key,
    user char varying (32) not null,
    amount bigint not null,
    day integer(1-7) not null
);

create table transaction_comments (
    id uuid primary key,
    body text not null,
    transaction_id uuid not null
);

It is necessary to:

  • Count the number of records or transactions for each day of the week (day)
  • Find only transactions that have no comments
  • Find transactions with the maximum amount

Question review

Mentor
Answer as you would in a real interview. I’ll ask follow-up questions, then compare your answer with the reference answer and show your accuracy as a %.
Sign in to start the dialogue The mentor keeps the context of the current question and your previous messages.
Sign in