home / sakila

rental

25 rows where customer_id = 384

✎ 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
103 2005-05-25 17:30:42.000 3343 3343 384 384 2005-06-03 22:36:42.000 1 1 2020-12-23 07:15:21
279 2005-05-26 18:02:50.000 661 661 384 384 2005-06-03 18:48:50.000 2 2 2020-12-23 07:15:23
898 2005-05-30 09:26:19.000 3497 3497 384 384 2005-06-01 10:45:19.000 2 2 2020-12-23 07:15:32
1013 2005-05-31 02:37:00.000 4522 4522 384 384 2005-06-02 06:39:00.000 2 2 2020-12-23 07:15:33
1961 2005-06-17 09:02:58.000 2851 2851 384 384 2005-06-20 03:07:58.000 1 1 2020-12-23 07:15:46
2020 2005-06-17 12:39:50.000 1914 1914 384 384 2005-06-19 14:59:50.000 1 1 2020-12-23 07:15:47
2378 2005-06-18 14:57:49.000 2796 2796 384 384 2005-06-26 18:23:49.000 2 2 2020-12-23 07:15:52
2510 2005-06-18 23:44:21.000 3827 3827 384 384 2005-06-24 00:31:21.000 1 1 2020-12-23 07:15:54
2935 2005-06-20 05:07:24.000 2735 2735 384 384 2005-06-28 09:17:24.000 2 2 2020-12-23 07:16:00
3088 2005-06-20 15:56:05.000 3049 3049 384 384 2005-06-29 13:02:05.000 1 1 2020-12-23 07:16:02
3101 2005-06-20 16:48:58.000 1738 1738 384 384 2005-06-27 18:13:58.000 2 2 2020-12-23 07:16:02
4424 2005-07-07 22:14:43.000 662 662 384 384 2005-07-11 01:17:43.000 1 1 2020-12-23 07:16:22
5250 2005-07-09 13:35:32.000 2162 2162 384 384 2005-07-13 12:19:32.000 1 1 2020-12-23 07:16:34
5608 2005-07-10 05:08:26.000 3854 3854 384 384 2005-07-10 23:24:26.000 1 1 2020-12-23 07:16:39
5797 2005-07-10 14:43:52.000 1880 1880 384 384 2005-07-13 16:12:52.000 2 2 2020-12-23 07:16:42
5966 2005-07-10 23:59:27.000 2076 2076 384 384 2005-07-14 23:38:27.000 2 2 2020-12-23 07:16:45
6387 2005-07-11 22:15:56.000 1726 1726 384 384 2005-07-14 20:20:56.000 2 2 2020-12-23 07:16:50
7799 2005-07-28 07:42:09.000 2163 2163 384 384 2005-08-02 10:02:09.000 2 2 2020-12-23 07:17:12
8445 2005-07-29 07:37:48.000 2792 2792 384 384 2005-08-04 10:43:48.000 1 1 2020-12-23 07:17:21
11773 2005-08-17 10:19:51.000 1886 1886 384 384 2005-08-23 04:30:51.000 1 1 2020-12-23 07:18:08
13521 2005-08-20 02:42:28.000 2586 2586 384 384 2005-08-22 06:12:28.000 1 1 2020-12-23 07:18:33
14416 2005-08-21 11:11:46.000 3002 3002 384 384 2005-08-25 12:33:46.000 1 1 2020-12-23 07:18:47
14841 2005-08-22 02:03:30.000 4017 4017 384 384 2005-08-28 02:08:30.000 2 2 2020-12-23 07:18:52
14963 2005-08-22 06:38:10.000 2672 2672 384 384 2005-08-31 05:35:10.000 2 2 2020-12-23 07:18:54
15321 2005-08-22 20:20:04.000 4152 4152 384 384 2005-08-24 23:26:04.000 2 2 2020-12-23 07:19:00

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