home / sakila

rental

26 rows where customer_id = 474

✎ 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
816 2005-05-29 20:26:39.000 630 630 474 474 2005-06-06 22:31:39.000 2 2 2020-12-23 07:15:30
1758 2005-06-16 17:39:39.000 2654 2654 474 474 2005-06-25 13:06:39.000 1 1 2020-12-23 07:15:43
2944 2005-06-20 05:43:42.000 1550 1550 474 474 2005-06-29 09:40:42.000 2 2 2020-12-23 07:16:00
3787 2005-07-06 14:02:01.000 288 288 474 474 2005-07-09 19:09:01.000 2 2 2020-12-23 07:16:12
4048 2005-07-07 03:30:52.000 659 659 474 474 2005-07-14 05:05:52.000 2 2 2020-12-23 07:16:16
4481 2005-07-08 00:58:15.000 1669 1669 474 474 2005-07-11 23:22:15.000 2 2 2020-12-23 07:16:23
4533 2005-07-08 03:32:01.000 1105 1105 474 474 2005-07-10 21:57:01.000 1 1 2020-12-23 07:16:23
4785 2005-07-08 16:10:19.000 58 58 474 474 2005-07-11 18:52:19.000 1 1 2020-12-23 07:16:27
4809 2005-07-08 17:03:22.000 4251 4251 474 474 2005-07-17 22:39:22.000 1 1 2020-12-23 07:16:28
4886 2005-07-08 19:53:22.000 3393 3393 474 474 2005-07-09 17:05:22.000 1 1 2020-12-23 07:16:29
5251 2005-07-09 13:36:10.000 478 478 474 474 2005-07-15 11:40:10.000 1 1 2020-12-23 07:16:34
6499 2005-07-12 03:11:18.000 3165 3165 474 474 2005-07-21 07:50:18.000 2 2 2020-12-23 07:16:52
8991 2005-07-30 04:42:54.000 4540 4540 474 474 2005-08-01 23:51:54.000 1 1 2020-12-23 07:17:29
10376 2005-08-01 06:27:13.000 4194 4194 474 474 2005-08-07 06:11:13.000 2 2 2020-12-23 07:17:49
11117 2005-08-02 08:36:03.000 1613 1613 474 474 2005-08-05 06:56:03.000 2 2 2020-12-23 07:17:59
11489 2005-08-02 22:35:28.000 3001 3001 474 474 2005-08-04 00:29:28.000 2 2 2020-12-23 07:18:05
11537 2005-08-17 00:41:08.000 190 190 474 474 2005-08-19 00:25:08.000 2 2 2020-12-23 07:18:05
11909 2006-02-14 15:16:03.000 871 871 474 474   1 1 2020-12-23 07:18:10
12083 2005-08-17 22:13:37.000 1985 1985 474 474 2005-08-19 19:01:37.000 2 2 2020-12-23 07:18:12
12236 2005-08-18 03:19:29.000 1190 1190 474 474 2005-08-23 07:39:29.000 2 2 2020-12-23 07:18:15
12440 2005-08-18 10:47:35.000 2779 2779 474 474 2005-08-21 11:10:35.000 2 2 2020-12-23 07:18:17
12597 2005-08-18 16:34:02.000 3804 3804 474 474 2005-08-25 17:30:02.000 2 2 2020-12-23 07:18:19
12702 2005-08-18 20:30:33.000 1884 1884 474 474 2005-08-27 01:22:33.000 2 2 2020-12-23 07:18:21
14728 2005-08-21 22:15:36.000 2671 2671 474 474 2005-08-25 17:14:36.000 2 2 2020-12-23 07:18:51
15046 2005-08-22 09:54:54.000 1536 1536 474 474 2005-08-26 07:34:54.000 1 1 2020-12-23 07:18:55
15558 2005-08-23 04:52:22.000 638 638 474 474 2005-09-01 02:26:22.000 1 1 2020-12-23 07:19:03

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.143ms