Advertisement
brianh6854

SQL Terminal for GDB Session

Jan 28th, 2013
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 1.28 KB | None | 0 0
  1. [brian@biosphere ~]$ mclient -u monetdb -d myschema
  2. password:
  3. Welcome TO mclient, the MonetDB/SQL interactive terminal (Oct2012-SP3)
  4. DATABASE: MonetDB v11.13.9 (Oct2012-SP3), 'mapi:monetdb://biosphere:50000/myschema'
  5. TYPE \q TO quit, \? FOR a list OF available commands
  6. auto commit mode: ON
  7. sql>\q
  8. [brian@biosphere ~]$ mclient -u monetdb -d myschema
  9. password:
  10. Welcome TO mclient, the MonetDB/SQL interactive terminal (Oct2012-SP3)
  11. DATABASE: MonetDB v11.13.9 (Oct2012-SP3), 'mapi:monetdb://biosphere:50000/myschema'
  12. TYPE \q TO quit, \? FOR a list OF available commands
  13. auto commit mode: ON
  14. sql>SELECT a.ip_dst AS ip_dst, b.tcp_dport AS tcp_dport, COUNT(*) AS num FROM "myschema".tablea a LEFT JOIN "myschema".tableb b ON (a.guid = b.guid) WHERE b.tcp_dport IS NOT NULL GROUP BY a.ip_dst, b.tcp_dport ORDER BY num DESC LIMIT 20;
  15. +-----------------+-----------+---------+
  16. | ip_dst          | tcp_dport | num     |
  17. +=================+===========+=========+
  18. DATA Ommited
  19. +-----------------+-----------+---------+
  20. 20 tuples (1m 19s)
  21. sql>SELECT a.ip_dst AS ip_dst, b.udp_dport AS udp_dport, COUNT(*) AS num FROM "myschema".tablea a LEFT JOIN "myschema".tablec b ON (a.guid = b.guid) WHERE b.udp_dport IS NOT NULL GROUP BY a.ip_dst, b.udp_dport ORDER BY num DESC LIMIT 20;
  22. Connection TERMINATED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement