home / sakila

rental

30 rows where customer_id = 404

✎ 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
1081 2005-05-31 10:56:32.000 4524 4524 404 404 2005-06-06 11:31:32.000 1 1 2020-12-23 07:15:34
1506 2005-06-15 22:19:37.000 4085 4085 404 404 2005-06-22 18:28:37.000 1 1 2020-12-23 07:15:40
1840 2005-06-16 23:39:34.000 340 340 404 404 2005-06-21 23:36:34.000 1 1 2020-12-23 07:15:44
2715 2005-06-19 14:29:35.000 2082 2082 404 404 2005-06-26 08:44:35.000 2 2 2020-12-23 07:15:57
2951 2005-06-20 06:23:01.000 2903 2903 404 404 2005-06-24 00:26:01.000 2 2 2020-12-23 07:16:00
3927 2005-07-06 20:48:14.000 2194 2194 404 404 2005-07-10 15:37:14.000 1 1 2020-12-23 07:16:14
4495 2005-07-08 01:43:46.000 3515 3515 404 404 2005-07-10 07:38:46.000 1 1 2020-12-23 07:16:23
4615 2005-07-08 07:46:53.000 1200 1200 404 404 2005-07-16 12:43:53.000 2 2 2020-12-23 07:16:25
4653 2005-07-08 09:48:01.000 2511 2511 404 404 2005-07-17 05:18:01.000 1 1 2020-12-23 07:16:25
4963 2005-07-08 23:38:40.000 737 737 404 404 2005-07-12 05:33:40.000 2 2 2020-12-23 07:16:30
5632 2005-07-10 06:17:06.000 2632 2632 404 404 2005-07-17 02:32:06.000 2 2 2020-12-23 07:16:40
6114 2005-07-11 07:33:48.000 479 479 404 404 2005-07-18 06:13:48.000 2 2 2020-12-23 07:16:47
6779 2005-07-12 16:10:50.000 4468 4468 404 404 2005-07-17 14:51:50.000 2 2 2020-12-23 07:16:56
6964 2005-07-27 00:15:04.000 1537 1537 404 404 2005-07-31 00:04:04.000 2 2 2020-12-23 07:16:59
8058 2005-07-28 17:07:49.000 2148 2148 404 404 2005-08-03 22:57:49.000 1 1 2020-12-23 07:17:15
8455 2005-07-29 07:53:06.000 4043 4043 404 404 2005-08-05 05:29:06.000 1 1 2020-12-23 07:17:21
9206 2005-07-30 12:46:59.000 2021 2021 404 404 2005-08-03 14:58:59.000 1 1 2020-12-23 07:17:32
9472 2005-07-30 23:03:32.000 4178 4178 404 404 2005-08-01 18:02:32.000 1 1 2020-12-23 07:17:36
9824 2005-07-31 11:49:55.000 4368 4368 404 404 2005-08-07 16:54:55.000 2 2 2020-12-23 07:17:41
10651 2005-08-01 16:20:22.000 1541 1541 404 404 2005-08-03 15:53:22.000 1 1 2020-12-23 07:17:53
12325 2005-08-18 06:41:30.000 1844 1844 404 404 2005-08-26 02:49:30.000 1 1 2020-12-23 07:18:16
12554 2005-08-18 14:47:28.000 715 715 404 404 2005-08-25 14:34:28.000 2 2 2020-12-23 07:18:19
13412 2005-08-19 22:46:35.000 2806 2806 404 404 2005-08-26 18:06:35.000 1 1 2020-12-23 07:18:31
13422 2005-08-19 23:07:24.000 3835 3835 404 404 2005-08-28 04:12:24.000 2 2 2020-12-23 07:18:32
14691 2005-08-21 20:42:29.000 2131 2131 404 404 2005-08-24 01:22:29.000 1 1 2020-12-23 07:18:50
14835 2005-08-22 01:49:07.000 755 755 404 404 2005-08-30 04:28:07.000 1 1 2020-12-23 07:18:52
14838 2005-08-22 01:57:34.000 506 506 404 404 2005-08-25 06:34:34.000 1 1 2020-12-23 07:18:52
14912 2005-08-22 04:51:42.000 2658 2658 404 404 2005-08-23 23:50:42.000 1 1 2020-12-23 07:18:53
15087 2005-08-22 11:24:09.000 233 233 404 404 2005-08-27 16:42:09.000 2 2 2020-12-23 07:18:56
15290 2005-08-22 19:28:02.000 270 270 404 404 2005-08-31 20:04:02.000 2 2 2020-12-23 07:18:59

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