home / sakila

rental

30 rows where customer_id = 444

✎ 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
201 2005-05-26 07:13:45.000 776 776 444 444 2005-06-04 02:02:45.000 2 2 2020-12-23 07:15:22
557 2005-05-28 08:36:22.000 158 158 444 444 2005-06-03 10:42:22.000 2 2 2020-12-23 07:15:27
1239 2005-06-15 04:53:01.000 3731 3731 444 444 2005-06-16 07:03:01.000 1 1 2020-12-23 07:15:36
1397 2005-06-15 16:25:26.000 1830 1830 444 444 2005-06-21 20:45:26.000 1 1 2020-12-23 07:15:38
1441 2005-06-15 18:54:21.000 2095 2095 444 444 2005-06-22 22:48:21.000 2 2 2020-12-23 07:15:39
2551 2005-06-19 02:51:04.000 2007 2007 444 444 2005-06-28 05:02:04.000 1 1 2020-12-23 07:15:55
3301 2005-06-21 07:32:25.000 503 503 444 444 2005-06-28 06:26:25.000 2 2 2020-12-23 07:16:05
3415 2005-06-21 16:59:49.000 3540 3540 444 444 2005-06-27 17:19:49.000 1 1 2020-12-23 07:16:07
3498 2005-07-06 00:02:08.000 1869 1869 444 444 2005-07-10 00:19:08.000 1 1 2020-12-23 07:16:08
3539 2005-07-06 01:39:08.000 4081 4081 444 444 2005-07-07 05:38:08.000 1 1 2020-12-23 07:16:08
4648 2005-07-08 09:31:27.000 3490 3490 444 444 2005-07-13 03:55:27.000 2 2 2020-12-23 07:16:25
5753 2005-07-10 12:29:43.000 3639 3639 444 444 2005-07-17 12:50:43.000 2 2 2020-12-23 07:16:42
5825 2005-07-10 16:20:30.000 3843 3843 444 444 2005-07-11 18:58:30.000 1 1 2020-12-23 07:16:43
6285 2005-07-11 16:52:07.000 2140 2140 444 444 2005-07-13 21:33:07.000 2 2 2020-12-23 07:16:49
7679 2005-07-28 02:58:39.000 1063 1063 444 444 2005-08-02 04:58:39.000 1 1 2020-12-23 07:17:10
9634 2005-07-31 05:06:02.000 924 924 444 444 2005-08-04 06:53:02.000 1 1 2020-12-23 07:17:38
10529 2005-08-01 12:00:02.000 851 851 444 444 2005-08-08 16:18:02.000 1 1 2020-12-23 07:17:51
10693 2005-08-01 18:14:14.000 2387 2387 444 444 2005-08-03 22:00:14.000 2 2 2020-12-23 07:17:54
11353 2005-08-02 17:34:45.000 1729 1729 444 444 2005-08-09 16:01:45.000 1 1 2020-12-23 07:18:02
11419 2005-08-02 19:46:38.000 514 514 444 444 2005-08-11 14:49:38.000 1 1 2020-12-23 07:18:03
11728 2005-08-17 08:12:26.000 726 726 444 444 2005-08-18 03:26:26.000 1 1 2020-12-23 07:18:08
12161 2005-08-18 00:41:46.000 2420 2420 444 444 2005-08-26 22:59:46.000 2 2 2020-12-23 07:18:13
12712 2005-08-18 21:04:13.000 2628 2628 444 444 2005-08-25 18:15:13.000 2 2 2020-12-23 07:18:21
12946 2005-08-19 05:53:34.000 2066 2066 444 444 2005-08-20 07:30:34.000 1 1 2020-12-23 07:18:24
13488 2005-08-20 01:28:42.000 867 867 444 444 2005-08-25 06:17:42.000 2 2 2020-12-23 07:18:33
13559 2005-08-20 04:16:07.000 2413 2413 444 444 2005-08-24 23:23:07.000 1 1 2020-12-23 07:18:34
13924 2005-08-20 17:05:18.000 3066 3066 444 444 2005-08-23 16:54:18.000 2 2 2020-12-23 07:18:39
15249 2005-08-22 17:58:27.000 121 121 444 444 2005-08-30 14:55:27.000 1 1 2020-12-23 07:18:58
15557 2005-08-23 04:52:17.000 3641 3641 444 444 2005-08-30 02:15:17.000 2 2 2020-12-23 07:19:03
15815 2005-08-23 14:55:47.000 316 316 444 444 2005-08-24 12:37:47.000 1 1 2020-12-23 07:19:07

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