home / sakila

rental

35 rows where customer_id = 381

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
169 2005-05-26 03:09:30.000 1758 1758 381 381 2005-05-27 01:37:30.000 2 2 2020-12-23 07:15:22
406 2005-05-27 13:46:46.000 2136 2136 381 381 2005-05-30 12:43:46.000 1 1 2020-12-23 07:15:25
835 2005-05-29 23:37:00.000 299 299 381 381 2005-06-02 23:38:00.000 1 1 2020-12-23 07:15:31
1402 2005-06-15 16:31:08.000 1951 1951 381 381 2005-06-24 19:31:08.000 1 1 2020-12-23 07:15:38
1878 2005-06-17 02:55:32.000 3319 3319 381 381 2005-06-21 03:44:32.000 1 1 2020-12-23 07:15:45
2410 2005-06-18 16:55:08.000 265 265 381 381 2005-06-20 12:40:08.000 2 2 2020-12-23 07:15:53
2418 2005-06-18 17:14:42.000 2756 2756 381 381 2005-06-26 16:33:42.000 1 1 2020-12-23 07:15:53
3425 2005-06-21 18:07:07.000 4548 4548 381 381 2005-06-27 22:59:07.000 2 2 2020-12-23 07:16:07
3812 2005-07-06 15:22:19.000 4490 4490 381 381 2005-07-08 13:04:19.000 1 1 2020-12-23 07:16:13
3970 2005-07-06 22:48:17.000 701 701 381 381 2005-07-15 19:07:17.000 1 1 2020-12-23 07:16:15
4735 2005-07-08 13:12:27.000 4324 4324 381 381 2005-07-13 10:06:27.000 2 2 2020-12-23 07:16:27
5689 2005-07-10 09:24:17.000 1731 1731 381 381 2005-07-15 05:36:17.000 1 1 2020-12-23 07:16:41
6116 2005-07-11 07:37:38.000 247 247 381 381 2005-07-14 11:53:38.000 2 2 2020-12-23 07:16:47
6451 2005-07-12 00:52:19.000 1008 1008 381 381 2005-07-16 21:30:19.000 2 2 2020-12-23 07:16:51
6778 2005-07-12 16:06:00.000 4503 4503 381 381 2005-07-14 21:57:00.000 2 2 2020-12-23 07:16:56
7375 2005-07-27 15:22:33.000 2970 2970 381 381 2005-08-01 20:06:33.000 1 1 2020-12-23 07:17:05
7645 2005-07-28 01:27:42.000 830 830 381 381 2005-08-03 07:16:42.000 2 2 2020-12-23 07:17:09
8688 2005-07-29 16:31:32.000 2263 2263 381 381 2005-07-30 12:39:32.000 1 1 2020-12-23 07:17:25
9144 2005-07-30 10:22:15.000 718 718 381 381 2005-08-05 08:14:15.000 1 1 2020-12-23 07:17:31
9173 2005-07-30 11:40:10.000 2103 2103 381 381 2005-08-04 05:40:10.000 2 2 2020-12-23 07:17:32
9822 2005-07-31 11:48:25.000 2469 2469 381 381 2005-08-05 15:52:25.000 2 2 2020-12-23 07:17:41
10033 2005-07-31 18:44:29.000 4480 4480 381 381 2005-08-04 19:52:29.000 1 1 2020-12-23 07:17:44
10608 2005-08-01 14:48:41.000 3835 3835 381 381 2005-08-04 17:32:41.000 2 2 2020-12-23 07:17:52
10705 2005-08-01 18:38:54.000 4338 4338 381 381 2005-08-04 18:00:54.000 1 1 2020-12-23 07:17:54
11519 2005-08-17 00:01:27.000 1034 1034 381 381 2005-08-19 04:54:27.000 2 2 2020-12-23 07:18:05
12135 2005-08-17 23:50:24.000 1019 1019 381 381 2005-08-23 18:01:24.000 2 2 2020-12-23 07:18:13
12237 2005-08-18 03:24:38.000 4422 4422 381 381 2005-08-25 09:05:38.000 1 1 2020-12-23 07:18:15
12632 2005-08-18 17:54:21.000 827 827 381 381 2005-08-22 18:58:21.000 1 1 2020-12-23 07:18:20
13202 2005-08-19 14:58:30.000 3546 3546 381 381 2005-08-27 17:10:30.000 1 1 2020-12-23 07:18:28
13430 2005-08-19 23:25:43.000 2852 2852 381 381 2005-08-22 18:41:43.000 1 1 2020-12-23 07:18:32
13614 2005-08-20 06:28:37.000 3736 3736 381 381 2005-08-22 07:54:37.000 2 2 2020-12-23 07:18:34
13995 2005-08-20 19:34:43.000 3789 3789 381 381 2005-08-25 22:25:43.000 2 2 2020-12-23 07:18:41
14198 2005-08-21 03:48:31.000 465 465 381 381 2005-08-24 07:10:31.000 2 2 2020-12-23 07:18:44
15299 2005-08-22 19:42:57.000 767 767 381 381 2005-08-23 15:29:57.000 2 2 2020-12-23 07:18:59
15747 2005-08-23 12:29:24.000 1517 1517 381 381 2005-08-31 08:27:24.000 2 2 2020-12-23 07:19:05

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE rental (
  rental_id INT NOT NULL,
  rental_date TIMESTAMP NOT NULL,
  inventory_id INT  NOT NULL,
  customer_id INT  NOT NULL,
  return_date TIMESTAMP DEFAULT NULL,
  staff_id SMALLINT  NOT NULL,
  last_update TIMESTAMP NOT NULL,
  PRIMARY KEY (rental_id),
  CONSTRAINT fk_rental_staff FOREIGN KEY (staff_id) REFERENCES staff (staff_id) ,
  CONSTRAINT fk_rental_inventory FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id) ,
  CONSTRAINT fk_rental_customer FOREIGN KEY (customer_id) REFERENCES customer (customer_id)
);
CREATE INDEX idx_rental_fk_inventory_id ON rental(inventory_id)
;
CREATE INDEX idx_rental_fk_customer_id ON rental(customer_id)
;
CREATE INDEX idx_rental_fk_staff_id ON rental(staff_id)
;
CREATE UNIQUE INDEX idx_rental_uq  ON rental (rental_date,inventory_id,customer_id)
;
Powered by Datasette · Queries took 10.776ms