Hey All,
Yes, I can code a bit and hence thought it would be interesting to first have a set up ready and then try out triggering some simple queries, see data and as I move along gain a deeper understanding of how HiveSQL works. My plan is to experiment with different queries, analyze the data, and gradually refine my approach to uncover meaningful insights. So starting with Basics right here and my first query is all about accounts holding Liquid #HIVE. The query restrict to the top 50 and can be refined accordingly by changing the Top value to any other number say 100 or more. Setting up my HiveSQL was pretty simple just follow the instructions - Register your HiveSQL account on doc.hivesql page and you should be good to have an account created for 1 HBD [Hive Backed Dollar]. OK before coming to the query part, you will need and SQL client to connect with HiveSQL and in my case I choose to use DBeaver which is a Free Universal Database Tool. I download the 24.3.5 version and with the credential that I created using the Register your HiveSQL account, I was able to login to the
host:: vip.hivesql.io
database: DBHive
port:: 1433
And now I was good to trigger queries. With some hit and trials initially and getting my MYSQL queries syntax right, I started executing queries to retrieve and analyze data. Through initial trial and error, I gradually became more comfortable with structuring efficient queries and interpreting the results. Here is the simple query to retrieve Top 50 #HIVE accounts HOLDING Liquid HIVE with their output and then there is a revised version of it to eliminate the users having more than a million #HIVE
Top 50 #HIVE accounts HOLDING Liquid HIVE
SELECT TOP 50
name AS account_name,
balance AS liquid_hive_balance
FROM Accounts
ORDER BY balance DESC;
Query Output
# | Account Name | Liquid HIVE Balance |
---|---|---|
1 | cold.dunamu | 137,532,682.303 |
2 | binance-hot2 | 40,908,113.963 |
3 | hive.fund | 37,614,565.522 |
4 | bt20hivedkdnel | 15,860,138.363 |
5 | freedom | 3,971,564.067 |
6 | bithumbsend2 | 2,072,032.132 |
7 | hot4.dunamu | 1,517,612.168 |
8 | hot1.dunamu | 1,428,260.670 |
9 | hot3.dunamu | 1,427,381.998 |
10 | hot2.dunamu | 1,421,147.847 |
11 | hot5.dunamu | 1,415,232.649 |
12 | honey-swap | 1,200,955.307 |
13 | huobi-withdrawal | 1,136,771.528 |
14 | gateiodeposit | 1,123,880.846 |
15 | keestone | 953,445.779 |
16 | mxchive | 841,261.089 |
17 | bhuz | 641,727.527 |
18 | blocktrades | 592,469.943 |
19 | jibberty | 567,930.469 |
20 | bittrex | 537,385.574 |
21 | mika | 533,804.807 |
22 | hivehbd | 500,413.243 |
23 | sternerz | 490,099.646 |
24 | omlakshmiom | 457,429.492 |
25 | user.dunamu | 418,117.113 |
26 | muchfun | 400,000.000 |
27 | alpha | 387,696.878 |
28 | ipromote | 339,659.573 |
29 | deepcrypto8 | 338,949.194 |
30 | indodaxhive | 314,032.779 |
31 | coinex-hot | 312,124.038 |
32 | hendrikdegrote | 300,962.838 |
33 | alpha-homer | 298,670.646 |
34 | splinterlands | 283,410.982 |
35 | wolf-sl.cold | 265,711.427 |
36 | compa11ke2 | 264,082.302 |
37 | teamsmooth-mm | 264,032.675 |
38 | x30 | 260,733.163 |
39 | bitgethive | 241,026.165 |
40 | pfunk3 | 228,064.780 |
41 | dele-puppy | 222,934.562 |
42 | arpolkin | 212,216.156 |
43 | ashleigh | 183,135.618 |
44 | anastacia | 183,135.618 |
45 | cleta | 183,135.617 |
46 | newsflash | 172,305.893 |
47 | probitred | 161,965.591 |
48 | another | 160,000.000 |
49 | bigbanginfinity | 159,066.789 |
50 | steempty | 157,891.097 |
Looking at the results it was clear that there are many exchange accounts that are coming into the picture and in order to get rid of those user accounts. I had to put in a WHERE clause and exclude accounts having 1 Million liquid #HIVE and here is the query with the output.
Top 50 #HIVE accounts HOLDING Liquid HIVE - Eliminated accounts having more than a Million #HIVE
SELECT TOP 50
name AS account_name,
balance AS liquid_hive_balance
FROM Accounts
WHERE balance <= 1000000 -- Exclude accounts with more than 1M HIVE
ORDER BY balance DESC;
Query Output
# | Account Name | Liquid HIVE Balance |
---|---|---|
1 | keestone | 953,445.779 |
2 | mxchive | 841,456.400 |
3 | bhuz | 641,727.527 |
4 | blocktrades | 592,469.943 |
5 | jibberty | 567,930.469 |
6 | bittrex | 537,385.574 |
7 | mika | 533,804.807 |
8 | hivehbd | 500,413.243 |
9 | sternerz | 490,099.646 |
10 | omlakshmiom | 457,429.492 |
11 | user.dunamu | 418,117.113 |
12 | muchfun | 400,000.000 |
13 | alpha | 387,696.878 |
14 | ipromote | 339,659.573 |
15 | deepcrypto8 | 338,949.194 |
16 | indodaxhive | 314,032.779 |
17 | coinex-hot | 312,124.038 |
18 | hendrikdegrote | 300,962.838 |
19 | alpha-homer | 298,670.646 |
20 | splinterlands | 283,410.982 |
21 | wolf-sl.cold | 265,711.427 |
22 | compa11ke2 | 264,082.302 |
23 | teamsmooth-mm | 264,032.675 |
24 | x30 | 260,733.163 |
25 | bitgethive | 241,026.165 |
26 | pfunk3 | 228,064.780 |
27 | dele-puppy | 222,934.562 |
28 | arpolkin | 212,216.156 |
29 | anastacia | 183,135.618 |
30 | ashleigh | 183,135.618 |
31 | cleta | 183,135.617 |
32 | newsflash | 172,305.893 |
33 | probitred | 161,965.591 |
34 | another | 160,000.000 |
35 | bigbanginfinity | 159,066.789 |
36 | steempty | 157,891.097 |
37 | steemmonsters | 155,847.503 |
38 | p4sp4sp4sp4s | 153,315.254 |
39 | delphisight | 149,476.205 |
40 | hitbtc-exchange | 146,086.156 |
41 | theycallmedan | 142,245.024 |
42 | gopax-deposit | 139,101.146 |
43 | introvert-dime | 136,553.582 |
44 | otisbrown | 127,519.761 |
45 | sandymeyer | 124,299.329 |
46 | somecallmejake | 116,455.566 |
47 | abit | 115,755.026 |
48 | xbtsio | 113,355.406 |
49 | renohq | 111,232.792 |
50 | wolf-sl | 109,544.977 |
More to come as I progress and to be honest it was a great learning experience interacting with HiveSQL getting the results for your queries and working out if there is a syntax error.
Started using HiveSQL and my FIRST Simple query - Top 50 accounts #HOLDING Liquid HIVE - Eliminated Accounts having more than a Million #HIVE...
#hivesql #DBeaver #learning #hivestatistics #data #datamining #hiveaccount #liquidhive
image source:: dbeaver
Best Regards
Paras