home / sakila

rental

31 rows where customer_id = 27

✎ 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
787 2005-05-29 16:03:03.000 3919 3919 27 27 2005-06-07 11:07:03.000 2 2 2020-12-23 07:15:30
1310 2005-06-15 10:11:42.000 2045 2045 27 27 2005-06-16 15:00:42.000 1 1 2020-12-23 07:15:37
1480 2005-06-15 21:17:17.000 2598 2598 27 27 2005-06-23 22:01:17.000 1 1 2020-12-23 07:15:39
1699 2005-06-16 13:05:09.000 4507 4507 27 27 2005-06-17 09:53:09.000 2 2 2020-12-23 07:15:42
1960 2005-06-17 08:59:57.000 2202 2202 27 27 2005-06-23 14:38:57.000 2 2 2020-12-23 07:15:46
2512 2005-06-18 23:48:47.000 4515 4515 27 27 2005-06-21 04:58:47.000 2 2 2020-12-23 07:15:54
2815 2005-06-19 20:03:29.000 3046 3046 27 27 2005-06-25 22:50:29.000 2 2 2020-12-23 07:15:58
3038 2005-06-20 12:28:59.000 2919 2919 27 27 2005-06-25 07:48:59.000 1 1 2020-12-23 07:16:01
3420 2005-06-21 17:22:36.000 2523 2523 27 27 2005-06-28 12:34:36.000 1 1 2020-12-23 07:16:07
4038 2005-07-07 02:52:53.000 1264 1264 27 27 2005-07-11 22:32:53.000 2 2 2020-12-23 07:16:16
4510 2005-07-08 02:34:51.000 1085 1085 27 27 2005-07-17 06:03:51.000 2 2 2020-12-23 07:16:23
5552 2005-07-10 03:01:19.000 2879 2879 27 27 2005-07-13 06:53:19.000 2 2 2020-12-23 07:16:39
5736 2005-07-10 11:45:48.000 1172 1172 27 27 2005-07-13 16:40:48.000 1 1 2020-12-23 07:16:41
6115 2005-07-11 07:36:50.000 3415 3415 27 27 2005-07-13 11:30:50.000 1 1 2020-12-23 07:16:47
6562 2005-07-12 05:26:26.000 3969 3969 27 27 2005-07-16 05:10:26.000 2 2 2020-12-23 07:16:53
6658 2005-07-12 11:13:21.000 172 172 27 27 2005-07-17 09:10:21.000 2 2 2020-12-23 07:16:55
7927 2005-07-28 12:13:42.000 1263 1263 27 27 2005-08-05 12:02:42.000 1 1 2020-12-23 07:17:13
9244 2005-07-30 14:06:53.000 3640 3640 27 27 2005-08-03 19:46:53.000 1 1 2020-12-23 07:17:33
9636 2005-07-31 05:12:59.000 1725 1725 27 27 2005-08-09 07:31:59.000 2 2 2020-12-23 07:17:38
9673 2005-07-31 06:34:55.000 339 339 27 27 2005-08-09 09:15:55.000 2 2 2020-12-23 07:17:39
9908 2005-07-31 14:39:52.000 4408 4408 27 27 2005-08-09 09:46:52.000 2 2 2020-12-23 07:17:42
10794 2005-08-01 21:51:15.000 889 889 27 27 2005-08-10 18:51:15.000 2 2 2020-12-23 07:17:55
10852 2005-08-02 00:00:33.000 3862 3862 27 27 2005-08-03 23:09:33.000 1 1 2020-12-23 07:17:56
11234 2005-08-02 13:12:17.000 1020 1020 27 27 2005-08-05 17:37:17.000 1 1 2020-12-23 07:18:01
11661 2005-08-17 05:25:57.000 1008 1008 27 27 2005-08-25 04:37:57.000 1 1 2020-12-23 07:18:07
11740 2005-08-17 08:48:31.000 2441 2441 27 27 2005-08-24 07:47:31.000 2 2 2020-12-23 07:18:08
12021 2005-08-17 19:52:43.000 3977 3977 27 27 2005-08-23 21:49:43.000 1 1 2020-12-23 07:18:12
12461 2005-08-18 11:28:14.000 1569 1569 27 27 2005-08-21 09:47:14.000 1 1 2020-12-23 07:18:17
12531 2005-08-18 13:57:50.000 2771 2771 27 27 2005-08-22 09:46:50.000 2 2 2020-12-23 07:18:18
13816 2005-08-20 13:13:56.000 273 273 27 27 2005-08-25 09:46:56.000 1 1 2020-12-23 07:18:38
15048 2005-08-22 10:00:04.000 2895 2895 27 27 2005-08-26 08:26:04.000 1 1 2020-12-23 07:18:55

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