home / sakila

rental

33 rows where customer_id = 297

✎ 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
143 2005-05-25 23:45:52.000 847 847 297 297 2005-05-27 21:41:52.000 2 2 2020-12-23 07:15:22
954 2005-05-30 16:57:29.000 1231 1231 297 297 2005-06-08 13:30:29.000 2 2 2020-12-23 07:15:32
1409 2005-06-15 16:58:12.000 1398 1398 297 297 2005-06-21 11:21:12.000 2 2 2020-12-23 07:15:38
2067 2005-06-17 16:11:08.000 1711 1711 297 297 2005-06-22 13:01:08.000 2 2 2020-12-23 07:15:48
2202 2005-06-18 02:09:24.000 815 815 297 297 2005-06-26 07:17:24.000 2 2 2020-12-23 07:15:50
2260 2005-06-18 05:38:36.000 2773 2773 297 297 2005-06-20 08:08:36.000 1 1 2020-12-23 07:15:51
2339 2005-06-18 11:29:22.000 313 313 297 297 2005-06-21 10:29:22.000 1 1 2020-12-23 07:15:52
3582 2005-07-06 04:10:35.000 1866 1866 297 297 2005-07-11 01:29:35.000 2 2 2020-12-23 07:16:09
4621 2005-07-08 08:02:18.000 1594 1594 297 297 2005-07-12 08:53:18.000 2 2 2020-12-23 07:16:25
4929 2005-07-08 22:06:18.000 734 734 297 297 2005-07-17 18:17:18.000 2 2 2020-12-23 07:16:30
5743 2005-07-10 11:57:38.000 593 593 297 297 2005-07-19 15:38:38.000 2 2 2020-12-23 07:16:41
6036 2005-07-11 03:02:28.000 2553 2553 297 297 2005-07-15 22:12:28.000 2 2 2020-12-23 07:16:46
6064 2005-07-11 04:23:18.000 265 265 297 297 2005-07-19 02:21:18.000 1 1 2020-12-23 07:16:46
6156 2005-07-11 09:45:48.000 302 302 297 297 2005-07-15 04:51:48.000 1 1 2020-12-23 07:16:47
6984 2005-07-27 00:56:30.000 2407 2407 297 297 2005-08-02 01:14:30.000 2 2 2020-12-23 07:16:59
7867 2005-07-28 10:08:54.000 713 713 297 297 2005-07-30 10:26:54.000 2 2 2020-12-23 07:17:13
7933 2005-07-28 12:27:27.000 3175 3175 297 297 2005-07-29 10:34:27.000 2 2 2020-12-23 07:17:13
9014 2005-07-30 05:19:27.000 311 311 297 297 2005-08-01 01:10:27.000 2 2 2020-12-23 07:17:29
9674 2005-07-31 06:36:53.000 3213 3213 297 297 2005-08-06 02:50:53.000 2 2 2020-12-23 07:17:39
10153 2005-07-31 22:30:10.000 2945 2945 297 297 2005-08-06 02:32:10.000 2 2 2020-12-23 07:17:46
10264 2005-08-01 03:03:12.000 1374 1374 297 297 2005-08-08 00:34:12.000 2 2 2020-12-23 07:17:47
11269 2005-08-02 14:11:41.000 2398 2398 297 297 2005-08-08 18:53:41.000 1 1 2020-12-23 07:18:01
11413 2005-08-02 19:35:19.000 1115 1115 297 297 2005-08-05 21:33:19.000 2 2 2020-12-23 07:18:03
11585 2005-08-17 02:14:36.000 753 753 297 297 2005-08-20 07:37:36.000 2 2 2020-12-23 07:18:06
11780 2005-08-17 10:34:24.000 2268 2268 297 297 2005-08-21 04:55:24.000 1 1 2020-12-23 07:18:08
11784 2005-08-17 10:48:05.000 3101 3101 297 297 2005-08-19 06:47:05.000 1 1 2020-12-23 07:18:08
12472 2005-08-18 11:58:48.000 4458 4458 297 297 2005-08-27 16:37:48.000 2 2 2020-12-23 07:18:18
13330 2005-08-19 19:59:21.000 4276 4276 297 297 2005-08-20 15:34:21.000 2 2 2020-12-23 07:18:30
13721 2005-08-20 10:02:59.000 1444 1444 297 297 2005-08-24 07:02:59.000 2 2 2020-12-23 07:18:36
13888 2005-08-20 15:39:42.000 1943 1943 297 297 2005-08-28 13:41:42.000 1 1 2020-12-23 07:18:39
14403 2005-08-21 10:40:34.000 3581 3581 297 297 2005-08-29 11:29:34.000 1 1 2020-12-23 07:18:46
15582 2005-08-23 05:45:44.000 4264 4264 297 297 2005-08-25 07:54:44.000 2 2 2020-12-23 07:19:03
15711 2005-08-23 10:43:00.000 789 789 297 297 2005-08-29 16:29:00.000 1 1 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 13.787ms