2. Question 2
A payment system needs a query that calculates the total commission for all transactions made by a customer.
A commission is a fee that is calculated based on the customer's country of origin.
Expected Output Columns
Column | Description |
---|---|
Customer email address | |
country | Customer country |
transactions | Total number of all transactions for a customer |
total_amount | Total amount of all transactions for a customer |
total_commission | Total commission for all transactions for a customer, rounded to two decimal places |
The result should be sorted in ascending order by email.
Note
- The total commission is the sum of the products of the transaction amounts and the commission of the client's country.
Schema
customers
name | type | constraint |
---|---|---|
id | INT | PRIMARY KEY |
VARCHAR(255) | ||
country | VARCHAR(255) | FOREIGN KEY (country → countries.name) |
countries
name | type | constraint | description |
---|---|---|---|
name | VARCHAR(255) | PRIMARY KEY | Country name |
commission | DECIMAL(3,2) | Country commission |
transactions
name | type | constraint |
---|---|---|
customer_id | INT | FOREIGN KEY (customer_id → customers.id) |
amount | DECIMAL(5,2) |

3. Question 3
In how many ways can the letters of the word 'HACKER' be rearranged such that the vowels always appear together?
Options:
- 5! × 2!
- 6!
- 6! × 2!
- 5!
4. Question 4
In a family, there are two parents: Alex and Jordan. The probability that at least one parent falls ill is 20%, and the probability that both parents fall ill is 5%. The probability that neither parent falls ill is 80%. If the probability that Alex falls ill is 12%, what is the probability that Jordan falls ill?
Options:
- 3%
- 13%
- 15%
- 8%
5. Question 5
Statement 1: A has two children. The older child is a girl. The probability that both children are girls is p1.
Statement 2: B has two children. At least one of them is a boy. The probability that both children are boys is p2.
Based on this, what is the correct relationship between p1 and p2?
Options:
- p1 = p2
- p1 > p2
- p2 > p1
- It cannot be determined.
我们长期稳定承接各大科技公司如TikTok、Google、Amazon等的OA笔试代写服务,确保满分通过。如有需求,请随时联系我们。
We consistently provide professional online assessment services for major tech companies like TikTok, Google, and Amazon, guaranteeing perfect scores. Feel free to contact us if you're interested.
