home / sakila

rental

25 rows where customer_id = 193

✎ 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
273 2005-05-26 16:29:36.000 1590 1590 193 193 2005-05-29 18:49:36.000 2 2 2020-12-23 07:15:23
464 2005-05-27 20:42:44.000 1313 1313 193 193 2005-05-30 00:49:44.000 2 2 2020-12-23 07:15:26
1325 2005-06-15 11:03:24.000 52 52 193 193 2005-06-20 10:54:24.000 1 1 2020-12-23 07:15:37
2377 2005-06-18 14:56:23.000 3568 3568 193 193 2005-06-27 12:36:23.000 1 1 2020-12-23 07:15:52
2841 2005-06-19 22:21:06.000 614 614 193 193 2005-06-28 00:56:06.000 1 1 2020-12-23 07:15:59
2846 2005-06-19 22:52:14.000 651 651 193 193 2005-06-22 17:12:14.000 1 1 2020-12-23 07:15:59
2880 2005-06-20 01:24:54.000 1700 1700 193 193 2005-06-23 02:42:54.000 2 2 2020-12-23 07:15:59
3297 2005-06-21 07:08:19.000 3969 3969 193 193 2005-06-28 11:53:19.000 2 2 2020-12-23 07:16:05
4892 2005-07-08 20:06:25.000 3566 3566 193 193 2005-07-14 20:04:25.000 1 1 2020-12-23 07:16:29
8211 2005-07-28 23:34:22.000 1859 1859 193 193 2005-08-04 21:18:22.000 1 1 2020-12-23 07:17:18
8379 2005-07-29 05:29:40.000 3907 3907 193 193 2005-08-06 05:56:40.000 2 2 2020-12-23 07:17:20
8431 2005-07-29 07:12:48.000 1583 1583 193 193 2005-08-01 10:03:48.000 1 1 2020-12-23 07:17:21
9079 2005-07-30 08:02:00.000 2143 2143 193 193 2005-07-31 04:02:00.000 2 2 2020-12-23 07:17:30
9575 2005-07-31 02:51:53.000 3971 3971 193 193 2005-08-03 20:54:53.000 2 2 2020-12-23 07:17:37
10462 2005-08-01 09:38:28.000 4526 4526 193 193 2005-08-02 09:52:28.000 2 2 2020-12-23 07:17:50
12384 2005-08-18 08:36:58.000 2557 2557 193 193 2005-08-23 05:08:58.000 1 1 2020-12-23 07:18:16
12658 2005-08-18 19:05:42.000 4320 4320 193 193 2005-08-19 19:08:42.000 1 1 2020-12-23 07:18:20
13529 2005-08-20 03:07:47.000 1979 1979 193 193 2005-08-21 21:50:47.000 1 1 2020-12-23 07:18:33
13608 2005-08-20 06:10:44.000 4110 4110 193 193 2005-08-24 07:08:44.000 1 1 2020-12-23 07:18:34
14679 2005-08-21 20:14:58.000 1520 1520 193 193 2005-08-23 23:39:58.000 1 1 2020-12-23 07:18:50
14927 2005-08-22 05:31:53.000 952 952 193 193 2005-08-27 07:04:53.000 1 1 2020-12-23 07:18:54
15164 2005-08-22 14:47:53.000 997 997 193 193 2005-08-25 16:05:53.000 1 1 2020-12-23 07:18:57
15344 2005-08-22 21:01:48.000 3560 3560 193 193 2005-08-27 15:47:48.000 1 1 2020-12-23 07:19:00
15495 2005-08-23 02:26:10.000 4310 4310 193 193 2005-08-30 01:07:10.000 2 2 2020-12-23 07:19:02
15729 2006-02-14 15:16:03.000 2699 2699 193 193   2 2 2020-12-23 07:19:05

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