home / sakila

rental

30 rows where customer_id = 334

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

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

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
13 2005-05-25 00:22:55.000 2294 2294 334 334 2005-05-30 04:28:55.000 1 1 2020-12-23 07:15:20
431 2005-05-27 16:31:05.000 4507 4507 334 334 2005-06-05 11:29:05.000 1 1 2020-12-23 07:15:25
1187 2005-06-15 00:58:50.000 1108 1108 334 334 2005-06-23 02:19:50.000 1 1 2020-12-23 07:15:35
1298 2005-06-15 09:32:53.000 4163 4163 334 334 2005-06-16 12:40:53.000 2 2 2020-12-23 07:15:37
2476 2005-06-18 20:57:12.000 3998 3998 334 334 2005-06-20 15:42:12.000 1 1 2020-12-23 07:15:54
3662 2005-07-06 08:11:48.000 3827 3827 334 334 2005-07-09 12:25:48.000 2 2 2020-12-23 07:16:10
4603 2005-07-08 06:57:07.000 755 755 334 334 2005-07-17 04:32:07.000 1 1 2020-12-23 07:16:25
5014 2005-07-09 01:51:49.000 4095 4095 334 334 2005-07-10 04:48:49.000 1 1 2020-12-23 07:16:31
5434 2005-07-09 21:25:20.000 3790 3790 334 334 2005-07-15 03:12:20.000 2 2 2020-12-23 07:16:37
5818 2005-07-10 15:51:12.000 3940 3940 334 334 2005-07-14 14:10:12.000 2 2 2020-12-23 07:16:43
5845 2005-07-10 17:23:14.000 2882 2882 334 334 2005-07-12 16:29:14.000 2 2 2020-12-23 07:16:43
6641 2005-07-12 10:33:14.000 2165 2165 334 334 2005-07-20 08:24:14.000 2 2 2020-12-23 07:16:54
6749 2005-07-12 14:43:05.000 2895 2895 334 334 2005-07-21 15:13:05.000 2 2 2020-12-23 07:16:56
6987 2005-07-27 00:59:50.000 3134 3134 334 334 2005-07-28 01:47:50.000 1 1 2020-12-23 07:16:59
8977 2005-07-30 04:14:07.000 4099 4099 334 334 2005-08-05 23:45:07.000 2 2 2020-12-23 07:17:29
9633 2005-07-31 05:04:08.000 1141 1141 334 334 2005-08-06 00:52:08.000 2 2 2020-12-23 07:17:38
10207 2005-08-01 00:53:01.000 2925 2925 334 334 2005-08-05 05:51:01.000 2 2 2020-12-23 07:17:46
10408 2005-08-01 07:42:10.000 4144 4144 334 334 2005-08-09 02:29:10.000 2 2 2020-12-23 07:17:49
10492 2005-08-01 10:42:28.000 1669 1669 334 334 2005-08-02 07:05:28.000 1 1 2020-12-23 07:17:51
10879 2005-08-02 00:33:20.000 4415 4415 334 334 2005-08-09 04:13:20.000 2 2 2020-12-23 07:17:56
10997 2005-08-02 04:49:02.000 300 300 334 334 2005-08-10 08:13:02.000 2 2 2020-12-23 07:17:58
12677 2005-08-18 19:36:05.000 1311 1311 334 334 2005-08-22 21:23:05.000 2 2 2020-12-23 07:18:20
13325 2005-08-19 19:52:02.000 2388 2388 334 334 2005-08-22 21:14:02.000 1 1 2020-12-23 07:18:30
13876 2005-08-20 15:15:28.000 3137 3137 334 334 2005-08-23 12:42:28.000 2 2 2020-12-23 07:18:39
14219 2006-02-14 15:16:03.000 3718 3718 334 334   2 2 2020-12-23 07:18:44
14645 2005-08-21 19:12:47.000 2369 2369 334 334 2005-08-25 21:42:47.000 1 1 2020-12-23 07:18:50
14984 2005-08-22 07:35:31.000 1704 1704 334 334 2005-08-30 02:32:31.000 1 1 2020-12-23 07:18:54
15548 2005-08-23 04:26:20.000 2350 2350 334 334 2005-08-28 01:27:20.000 1 1 2020-12-23 07:19:03
15656 2005-08-23 08:38:58.000 4239 4239 334 334 2005-08-24 04:08:58.000 2 2 2020-12-23 07:19:04
15669 2005-08-23 09:06:17.000 1542 1542 334 334 2005-08-30 08:10:17.000 2 2 2020-12-23 07:19:04

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 14.27ms