Mr. Mike Gibson's Cisco Info
Useful commands and SQL.

Useful CISCO command line commands
Favorite commands that can't be done in Web GUI

show commands:

Show CUBE commands

run sql commands:

Show CUPS commands for UC information

Show CUCM commands for phone ownership changes
Show CUCM commands for jabber information
Show CUCM commands for BLF phone information
Show CUCM commands for phone information
Hide CDR commands for phone information
List records of who has called a number:
run sql car select datetimeorigination,callingPartyNumber,finalCalledPartyNumber from tbl_billing_data where finalCalledPartyNumber = '912178753286' order by datetimeOrigination

Output will look something like this:
datetimeorigination callingpartynumber finalcalledpartynumber
=================== ================== ======================
1399479957          81234              912178753286

Same, but making datetimeorigination readable:
run sql car select dbinfo('utc_to_datetime', datetimeorigination) ,callingpartynumber,finalcalledpartynumber from tbl_billing_data where finalcalledpartynumber = '82345' order by datetimeOrigination

Output will look something like this:
(expression)          callingpartynumber finalcalledpartynumber
===================== ================== ======================
2014-04-10 09:28:40.0 82747              82345
2014-04-30 15:57:12.0 6186706142         82345

Very detailed call report for campus calling
run sql car select origdevicename,user_id,callingpartynumber,datetimestampconnect,duration,datetimestampdisconnect,finalcalledpartynumber,destdevicename from tbl_billing_data where finalcalledpartynumber='82345' and callingpartynumber='81234' order by datetimeOrigination

Output will look something like this:
origdevicename  user_id          callingpartynumber datetimestampconnect  duration datetimestampdisconnect finalcalledpartynumber destdevicename
=============== ================ ================== ===================== ======== ======================= ====================== ===============
SEP10234E17EF3C mikebro          81234              2014-04-17 10:27:58.0 20       2014-04-17 10:28:18.0   82345                  SEP114033746682
SEP10234E17EF3C mikebro          81234              2014-04-17 15:29:10.0 8        2014-04-17 15:29:18.0   82345                  SEP114033746682
SEP10234E17EF3C mikebro          81234              2014-04-30 14:54:32.0 24       2014-04-30 14:54:56.0   82345                  SEP114033746682
SEP10234E17EF3C mikebro          81234              2014-05-01 13:32:13.0 163      2014-05-01 13:34:56.0   82345                  SEP114033746682
SEP10234E17EF3C mikebro          81234              2014-05-19 15:47:03.0 471      2014-05-19 15:54:54.0   82345                  SEP114033746682
To_3845_CUBE    _unspecifieduser 81234              2014-05-20 12:19:50.0 157      2014-05-20 12:22:27.0   82345                  SEP114033746682
SEP10234E17EF3C mikebro          81234              2014-05-22 13:04:11.0 4        2014-05-22 13:04:15.0   82345                  SEP114033746682
To_3845_CUBE    _unspecifieduser 81234              2014-05-28 11:33:01.0 91       2014-05-28 11:34:32.0   82345                  SEP114033746682
To_3845_CUBE    _unspecifieduser 81234              2014-05-28 11:35:08.0 14       2014-05-28 11:35:22.0   82345                  SEP114033746682
To_3845_CUBE    _unspecifieduser 81234              2014-05-28 11:56:52.0 69       2014-05-28 11:58:01.0   82345                  SEP4A0E714696F0
SEP10234E17EF3C mikebro          81234              2014-05-29 15:27:10.0 330      2014-05-29 15:32:40.0   82345                  SEP114033746682
To_3845_CUBE    _unspecifieduser 81234              2014-05-29 16:43:50.0 95       2014-05-29 16:45:25.0   82345                  SEP114033746682
To_3845_CUBE    _unspecifieduser 81234              2014-05-30 16:14:59.0 12       2014-05-30 16:15:11.0   82345                  SEP114033746682



Another qood querry for hunt group views with originalcalledpartynumber and finalcalledpartynumber:
run sql car select origdevicename,callingpartynumber,datetimestampconnect,duration,datetimestampdisconnect,originalcalledpartynumber,finalcalledpartynumber,destdevicename from tbl_billing_data where originalcalledpartynumber='81234' order by datetimeOrigination

Show TABLE information