home / sakila

rental

32 rows where customer_id = 442

✎ 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
466 2005-05-27 20:57:07.000 1786 1786 442 442 2005-05-29 15:52:07.000 1 1 2020-12-23 07:15:26
558 2005-05-28 08:38:43.000 4163 4163 442 442 2005-06-06 13:52:43.000 1 1 2020-12-23 07:15:27
632 2005-05-28 17:37:50.000 1287 1287 442 442 2005-06-03 16:04:50.000 1 1 2020-12-23 07:15:28
1251 2005-06-15 05:58:55.000 3307 3307 442 442 2005-06-23 02:45:55.000 2 2 2020-12-23 07:15:36
1358 2005-06-15 13:28:48.000 2025 2025 442 442 2005-06-21 13:40:48.000 1 1 2020-12-23 07:15:38
1576 2005-06-16 03:54:39.000 1014 1014 442 442 2005-06-24 21:55:39.000 2 2 2020-12-23 07:15:40
1774 2005-06-16 18:27:52.000 3058 3058 442 442 2005-06-21 13:35:52.000 2 2 2020-12-23 07:15:43
3545 2005-07-06 02:16:17.000 3924 3924 442 442 2005-07-11 00:54:17.000 1 1 2020-12-23 07:16:09
3661 2005-07-06 08:10:02.000 2600 2600 442 442 2005-07-10 10:17:02.000 1 1 2020-12-23 07:16:10
4052 2005-07-07 03:38:22.000 206 206 442 442 2005-07-13 02:56:22.000 2 2 2020-12-23 07:16:16
4058 2005-07-07 04:02:50.000 3877 3877 442 442 2005-07-10 04:30:50.000 2 2 2020-12-23 07:16:16
4365 2005-07-07 19:47:46.000 3207 3207 442 442 2005-07-08 23:21:46.000 2 2 2020-12-23 07:16:21
4577 2005-07-08 05:59:00.000 1688 1688 442 442 2005-07-16 06:23:00.000 2 2 2020-12-23 07:16:24
6590 2005-07-12 07:08:21.000 1067 1067 442 442 2005-07-18 06:16:21.000 2 2 2020-12-23 07:16:53
6632 2005-07-12 09:33:10.000 2929 2929 442 442 2005-07-15 11:36:10.000 1 1 2020-12-23 07:16:54
7427 2005-07-27 17:20:16.000 2548 2548 442 442 2005-08-03 20:38:16.000 2 2 2020-12-23 07:17:06
7460 2005-07-27 18:41:35.000 919 919 442 442 2005-07-29 15:16:35.000 2 2 2020-12-23 07:17:07
7671 2005-07-28 02:48:31.000 3464 3464 442 442 2005-07-30 23:04:31.000 1 1 2020-12-23 07:17:10
8044 2005-07-28 16:49:12.000 879 879 442 442 2005-08-02 22:41:12.000 1 1 2020-12-23 07:17:15
8758 2005-07-29 19:20:49.000 2816 2816 442 442 2005-08-05 21:57:49.000 2 2 2020-12-23 07:17:26
9180 2005-07-30 12:03:15.000 3479 3479 442 442 2005-08-01 14:25:15.000 1 1 2020-12-23 07:17:32
9873 2005-07-31 13:32:18.000 667 667 442 442 2005-08-06 11:15:18.000 2 2 2020-12-23 07:17:42
10034 2005-07-31 18:45:30.000 354 354 442 442 2005-08-04 21:13:30.000 2 2 2020-12-23 07:17:44
10365 2005-08-01 06:08:44.000 4032 4032 442 442 2005-08-06 02:07:44.000 1 1 2020-12-23 07:17:49
10452 2005-08-01 09:11:36.000 1973 1973 442 442 2005-08-04 13:28:36.000 2 2 2020-12-23 07:17:50
12948 2005-08-19 05:55:14.000 4173 4173 442 442 2005-08-22 01:05:14.000 2 2 2020-12-23 07:18:24
13004 2005-08-19 07:40:08.000 771 771 442 442 2005-08-20 11:49:08.000 1 1 2020-12-23 07:18:25
13155 2005-08-19 13:10:23.000 290 290 442 442 2005-08-25 19:07:23.000 2 2 2020-12-23 07:18:28
14199 2005-08-21 03:48:43.000 658 658 442 442 2005-08-23 04:01:43.000 1 1 2020-12-23 07:18:44
14418 2005-08-21 11:14:26.000 89 89 442 442 2005-08-28 08:34:26.000 2 2 2020-12-23 07:18:47
14466 2005-08-21 13:03:13.000 923 923 442 442 2005-08-22 15:19:13.000 2 2 2020-12-23 07:18:47
15207 2005-08-22 16:35:25.000 1149 1149 442 442 2005-08-23 14:06:25.000 1 1 2020-12-23 07:18:58

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