I am new to sqlite3. I imported in SQLite through python an exported CSV file listing IP addresses from Splunk and I plan on increasing the count column on my database every time a similar IP address gets recognized.
What I had in mind was to use SQLite CASE statement, documentation, update statement, etc. I tried:
SELECT * CASE WHEN src_ip = src_ip THEN UPDATE table SET Count = Count + 1;
also tried,
UPDATE table SET Count = Count + 1 WHERE src_ip = src_ip;
I know I'm wrong I can't quite figure this problem out for days. Here's what my sqlite3 database looks like in cmd prompt:
sqlite> select * from result;
1537536602|2002:8672:d515::8672:d515|
1537288499|150.135.165.114|
1537536602|2002:8672:d515::8672:d515|
1537288499|150.135.165.114|
sqlite>
sqlite> .schema
CREATE TABLE result (_time STR, 'src_ip' STR, Count INT);
sqlite>
I will continue to look for solution. I appreciate any feedback!