---
# System prepended metadata

title: Next Talent Test

---

# Task: Web API (SQL)

## Create Table Script

### Table Person
```
CREATE TABLE `person` (
    `id` varchar(36) NOT NULL,
    `name` varchar(100) NOT NULL,
    `country` varchar(100) NOT NULL,
    `is_active` TINYINT NOT NULL DEFAULT 0,
    `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `created_by` varchar(36) NOT NULL,
    `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `updated_by` varchar(36) ,
    `deleted_at` datetime DEFAULT NULL,
    `deleted_by` varchar(36) ,
    PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_general_ci;
```

### Insert Script
```
INSERT INTO person (id,name,country,is_active,created_at,created_by,updated_at,updated_by,deleted_at,deleted_by) VALUES
	 ('6ece3f96-0449-4d32-af76-ffaebe0da4f9','Adam','Kuala Lumpur',1,'2023-09-23 10:25:40','98bb61d0-46e8-44be-9bd1-e63175aba6f8','2023-09-23 10:25:40',NULL,NULL,NULL),
	 ('571863cb-1999-467b-aca8-41920ca99ef3','John','Singapore',1,'2023-09-23 10:25:40','98bb61d0-46e8-44be-9bd1-e63175aba6f8','2023-09-23 10:25:40',NULL,NULL,NULL),
	 ('9d53fb71-350c-41c2-820d-cc509875cbaf','Henry','Singapore',1,'2023-09-23 10:25:40','98bb61d0-46e8-44be-9bd1-e63175aba6f8','2023-09-23 10:25:40',NULL,NULL,NULL),
	 ('505075e8-2329-453b-aa59-8a3a89a2d043','Dominic','Thailand',1,'2023-09-23 10:25:40','98bb61d0-46e8-44be-9bd1-e63175aba6f8','2023-09-23 10:25:40',NULL,NULL,NULL);

```

### Select Script
```
SELECT `country` FROM person WHERE name = 'Adam'
```