· 7 years ago · Nov 27, 2018, 01:02 AM
1drop temporary table if exists mp3recordings_t;
2
3
4create temporary table if not exists mp3recordings_t (
5 startepoch int(10) NOT NULL,
6 endepoch int (10) NOT NULL,
7 starttime datetime NOT NULL,
8 endtime datetime NOT NULL,
9 numberdialed varchar(15) NOT NULL,
10 urllink varchar(255)primary key NOT NULL,
11 extension varchar(100) NOT NULL,
12 callseconds int(10) NOT NULL,
13 user_id varchar(20)
14);
15
16insert into mp3recordings_t
17select c.start_epoch, c.end_epoch, r.start_time, r.end_time, c.number_dialed, r.location, c.extension, c.length_in_sec, r.user
18from call_log c
19inner join recording_log r
20on c.end_epoch = r.end_epoch
21order by extension
22limit 100;
23
24
25select *
26from mp3recordings_t
27order by extension;