<commit_before>-- VIEWS --------------
-- ---------------------

CREATE VIEW `users_groups` AS
    select `u`.`username` AS `username`,
    `u`.`password` AS `password`,
    `u`.`secret` AS `secret`,
    `u`.`email` AS `email`,
    `g`.`group_name` AS `group_name`
    from
    ((`people_group` `ug` join `users` `u` on((`u`.`uid` = `ug`.`uid`))) join `bbc_group` `g` on((`g`.`gid` = `ug`.`gid`)));



CREATE VIEW `hops_users` AS select concat(`pt`.`team_member`,'__',`p`.`projectname`) AS `project_user` from ((`project` `p` join `project_team` `pt`) join `ssh_keys` `sk`) where `pt`.`team_member` in (select `u`.`email` from (`users` `u` join `ssh_keys` `s`) where (`u`.`uid` = `s`.`uid`));

CREATE VIEW `projects_last_payment` AS
  select `project_payments_history`.`projectname` AS `projectname`,
         max(`project_payments_history`.`transaction_date`) AS `max(transaction_date)`
  from `project_payments_history`
  where (`project_payments_history`.`action` = 'DEPOSIT_MONEY')
  group by `project_payments_history`.`projectname`
  order by max(`project_payments_history`.`transaction_date`);
<commit_msg>[HOPSWORKS-181] change name of column in projects_last_payment view to avoid confusion with mysql max syntax (#89)<commit_after>-- VIEWS --------------
-- ---------------------

CREATE VIEW `users_groups` AS
    select `u`.`username` AS `username`,
    `u`.`password` AS `password`,
    `u`.`secret` AS `secret`,
    `u`.`email` AS `email`,
    `g`.`group_name` AS `group_name`
    from
    ((`people_group` `ug` join `users` `u` on((`u`.`uid` = `ug`.`uid`))) join `bbc_group` `g` on((`g`.`gid` = `ug`.`gid`)));



CREATE VIEW `hops_users` AS select concat(`pt`.`team_member`,'__',`p`.`projectname`) AS `project_user` from ((`project` `p` join `project_team` `pt`) join `ssh_keys` `sk`) where `pt`.`team_member` in (select `u`.`email` from (`users` `u` join `ssh_keys` `s`) where (`u`.`uid` = `s`.`uid`));

CREATE VIEW `projects_last_payment` AS
  select `project_payments_history`.`projectname` AS `projectname`,
         max(`project_payments_history`.`transaction_date`) AS `transaction_date`
  from `project_payments_history`
  where (`project_payments_history`.`action` = 'DEPOSIT_MONEY')
  group by `project_payments_history`.`projectname`
  order by max(`project_payments_history`.`transaction_date`);

{'fraction_non_alphanumeric': 0.2153316106804479, 'fraction_numerical': 0.002153316106804479, 'mean_word_length': 4.414918414918415, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6415716', 'n_tokens_mistral': 843, 'n_tokens_neox': 818, 'n_words': 191}