home / sakila

rental

28 rows where customer_id = 6

✎ 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
57 2005-05-25 08:43:32.000 3938 3938 6 6 2005-05-29 06:42:32.000 2 2 2020-12-23 07:15:20
577 2005-05-28 11:09:14.000 375 375 6 6 2005-06-01 13:27:14.000 2 2 2020-12-23 07:15:27
916 2005-05-30 11:25:01.000 1290 1290 6 6 2005-05-31 09:06:01.000 1 1 2020-12-23 07:15:32
1575 2005-06-16 03:41:38.000 3317 3317 6 6 2005-06-22 03:01:38.000 2 2 2020-12-23 07:15:40
1841 2005-06-16 23:44:13.000 2363 2363 6 6 2005-06-22 04:09:13.000 1 1 2020-12-23 07:15:44
1966 2005-06-17 09:19:45.000 2085 2085 6 6 2005-06-20 11:19:45.000 1 1 2020-12-23 07:15:46
2345 2005-06-18 12:03:23.000 1818 1818 6 6 2005-06-22 14:25:23.000 2 2 2020-12-23 07:15:52
3983 2005-07-06 23:14:21.000 1261 1261 6 6 2005-07-12 17:55:21.000 2 2 2020-12-23 07:16:15
4278 2005-07-07 14:53:24.000 3693 3693 6 6 2005-07-13 14:21:24.000 2 2 2020-12-23 07:16:20
5553 2005-07-10 03:03:35.000 1686 1686 6 6 2005-07-14 07:49:35.000 2 2 2020-12-23 07:16:39
6211 2005-07-11 12:39:01.000 2699 2699 6 6 2005-07-20 15:59:01.000 2 2 2020-12-23 07:16:48
6248 2005-07-11 15:01:54.000 2686 2686 6 6 2005-07-19 16:58:54.000 1 1 2020-12-23 07:16:48
6686 2005-07-12 12:18:38.000 3804 3804 6 6 2005-07-13 17:56:38.000 2 2 2020-12-23 07:16:55
7099 2005-07-27 05:03:44.000 3136 3136 6 6 2005-07-29 00:12:44.000 2 2 2020-12-23 07:17:01
7136 2005-07-27 06:38:25.000 1929 1929 6 6 2005-08-03 05:13:25.000 1 1 2020-12-23 07:17:02
8101 2005-07-28 18:47:23.000 731 731 6 6 2005-07-31 16:23:23.000 1 1 2020-12-23 07:17:16
10271 2005-08-01 03:13:39.000 3692 3692 6 6 2005-08-07 23:40:39.000 1 1 2020-12-23 07:17:47
11023 2005-08-02 05:36:38.000 3617 3617 6 6 2005-08-10 05:39:38.000 1 1 2020-12-23 07:17:58
11398 2005-08-02 18:55:15.000 3952 3952 6 6 2005-08-10 19:50:15.000 2 2 2020-12-23 07:18:03
11591 2005-08-17 02:29:41.000 1670 1670 6 6 2005-08-23 20:47:41.000 1 1 2020-12-23 07:18:06
11727 2005-08-17 08:12:20.000 98 98 6 6 2005-08-19 12:45:20.000 1 1 2020-12-23 07:18:08
11853 2005-08-17 13:39:32.000 3888 3888 6 6 2005-08-23 18:44:32.000 2 2 2020-12-23 07:18:09
12254 2005-08-18 04:05:29.000 2858 2858 6 6 2005-08-23 04:17:29.000 1 1 2020-12-23 07:18:15
13451 2005-08-20 00:18:25.000 3837 3837 6 6 2005-08-29 01:08:25.000 1 1 2020-12-23 07:18:32
14329 2005-08-21 08:22:56.000 3544 3544 6 6 2005-08-28 02:22:56.000 2 2 2020-12-23 07:18:45
14377 2005-08-21 09:49:28.000 1325 1325 6 6 2005-08-29 13:34:28.000 1 1 2020-12-23 07:18:46
15509 2005-08-23 02:51:24.000 1291 1291 6 6 2005-08-31 06:21:24.000 2 2 2020-12-23 07:19:02
15603 2005-08-23 06:41:32.000 2565 2565 6 6 2005-08-28 08:51:32.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.899ms