1. Go to this page and download the library: Download moirei/hogql library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
moirei / hogql example snippets
use MOIREI\HogQl\Facade as HogQl;
...
HogQl::select(['event_name', 'COUNT(*) as event_count'])
->whereBetween('timestamp', ['2024-01-01 12:00:00', '2024-07-28 10:15:39'])
->groupBy('event_name')
->orderBy('event_count', 'DESC')
->get();