---
# System prepended metadata

title: Interview with Erica Ang

---

# Interview with Erica Ang



## SQL

Given these tables:

Users
=====
- id : int 
- email : string
- password : string
- first_name : string
- last_name : string

Wallets
======
- id : int
- user_id : int
- balance : int
- currency : string

1. Find all wallet balances belonging to Austin Powers

```sql=
# TODO
select balance from Wallets
join Users
on Users.id = Wallets.user_id
where Users.first_name = 'Austin' and Users.last_name='Powers'
```

2. Something went wrong. A peer has deleted some users (based on client request). As a result, there exists data errors in the system now.
    1. Find all wallets which belongs to these deleted users.
    2. How do we mitigate such errors in the future?
        - add cascade

```sql=
# TODO
delete from Wallets 
where user_id not in (select id from Users)
```

# Fullstack case study

I am your client. I run a brick and mortar math education startup.
You are a consultant, a full-stack developer, and you have free reign over how things are built.

## Case

I want to have a page whereby I can display problem sums. I want to track all my students’ actions when they are working on the problem sum.

## Requirements gathering skills

- For each student, different sets of problem sums?
    - no
- customized for each student?
    - yes / no. everybody gets the same sets of questions
- Autocorrect?
    - we're a math startup. so it will be 1 + 2, 2 + 3
- Want to keep track of scores?
    - yes
- Multiple attempts?
    - yes
- Only final submission?
    - yes i want their workings as well
- Time limit?
    - no need

## Requirements

- Age range = 10 - 14
- Example Question: 
    - Wendy spent 4/7 of her money on a pair of shoes and 2/3 of the remainder on a pair of earrings. Given that she had $10 left, how much did Wendy have at first?
    - Walk through the steps
        - 10 * 3
        - / 7 * 4
- Build a calculator so that they can use it to solve the questions

## Frontend

```jsx=
const Calculator = (props) =>{
    const buttonLabel = [
        [0, 1, 2, 3, '+'],
        [0, 1, 2, 3, '+'],
        [0, 1, 2, 3, '+'],
        [0, 1, 2, 3, '+'],
    ]
    const [sum, setSum] = useState(0);
    
    const handleClick = (e) => {
        swt
    }
    
    return (
        <div>{props.question1}</div>
        <div>
            <div>{sum}</div>
            <Row>
                buttonLabel.map((label) => {
                <Col>
                    <button onClick={}>label</button>
                </Col>
            })
            </Row>
        </div>
    )
}

```