Skip to content

Instantly share code, notes, and snippets.

@Unison1
Created August 7, 2018 12:39
Show Gist options
  • Save Unison1/db6bbdfbd065979d7547cf45e9b467d2 to your computer and use it in GitHub Desktop.
Save Unison1/db6bbdfbd065979d7547cf45e9b467d2 to your computer and use it in GitHub Desktop.
SQLite script for searching calls in the Viber database
------------Поиск по номеру и вывод сообщений---------------------------------------------
SELECT CASE type
WHEN '1' THEN 'Принятый'
WHEN '2' THEN 'Набранный'
WHEN '3' THEN 'Пропущенный'
END AS [Тип],
number,DATETIME(SUBSTR(date , 1,10), 'unixepoch', 'localtime') AS [Дата], TIME(duration,'unixepoch') AS [Продолжительность]
FROM calls
WHERE calls.canonized_number = '*************'--фильтруем таблицу по номеру
ORDER BY duration DESC
-------------------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment