niammuddin

update freeradius db 1

Feb 7th, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. CREATE VIEW profiles AS
  2. SELECT
  3. row_number() OVER (ORDER BY a.groupname) AS id,
  4. a.identity,
  5. a.users,
  6. a.groupname,
  7. b.value AS shared,
  8. c.value AS period,
  9. d.value AS rate,
  10. k.value AS portlimit,
  11. formatbytes(e.value) AS quota,
  12. formatbytes(f.value) AS valume,
  13. g.value AS times,
  14. h.value AS daily,
  15. i.value AS ppp,
  16. j.price,
  17. j.discount,
  18. a.description
  19. FROM radgroupcheck a
  20. LEFT JOIN radgroupcheck b ON a.groupname = b.groupname AND b.attribute = 'Simultaneous-Use'
  21. LEFT JOIN radgroupcheck c ON a.groupname = c.groupname AND c.attribute = 'Access-Period'
  22. LEFT JOIN radgroupreply k ON a.groupname = k.groupname AND k.attribute = 'Port-Limit'
  23. LEFT JOIN radgroupreply d ON a.groupname = d.groupname AND d.attribute = 'Mikrotik-Rate-Limit'
  24. LEFT JOIN radgroupreply e ON a.groupname = e.groupname AND e.attribute = 'Mikrotik-Total-Limit'
  25. LEFT JOIN radgroupcheck f ON a.groupname = f.groupname AND f.attribute = 'Max-Data'
  26. LEFT JOIN radgroupcheck g ON a.groupname = g.groupname AND g.attribute = 'Max-All-Session'
  27. LEFT JOIN radgroupcheck h ON a.groupname = h.groupname AND h.attribute = 'Max-Daily-Session'
  28. LEFT JOIN radgroupreply i ON a.groupname = i.groupname AND i.attribute = 'Framed-Protocol'
  29. LEFT JOIN radprice j ON a.groupname = j.groupname
  30. GROUP BY a.identity, a.users, a.groupname, b.value, c.value, d.value, k.value, e.value, f.value, g.value, h.value, i.value, j.price, j.discount, a.description;
Add Comment
Please, Sign In to add comment