<commit_before>package uk.ac.ebi.pride.archive.repo.repos.project;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author <NAME>
 * @version $Id$
 */
@Transactional
@Repository
public interface ProjectRepository extends CrudRepository<Project, Long> {

  Project findByAccession(String projectAccession);

  @Query("select p from Project p where p.submitter.id = ?1")
  List<Project> findAllBySubmitterId(Long submitterId);

  @Query("select p.accession from Project p order by p.submissionDate")
  List<String> findAllAccessions();

  @Query("select p.accession from Project p where p.changed = 1")
  List<String> findAllAccessionsChanged();
}<commit_msg>added month wise statistics query<commit_after>package uk.ac.ebi.pride.archive.repo.repos.project;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author <NAME>
 * @version $Id$
 */
@Transactional
@Repository
public interface ProjectRepository extends CrudRepository<Project, Long> {

  Project findByAccession(String projectAccession);

  @Query("select p from Project p where p.submitter.id = ?1")
  List<Project> findAllBySubmitterId(Long submitterId);

  @Query("select p.accession from Project p order by p.submissionDate")
  List<String> findAllAccessions();

  @Query("select p.accession from Project p where p.changed = 1")
  List<String> findAllAccessionsChanged();

  @Query(value="select to_char(trunc(submission_date,'MM'),'MON-YY') MONTH ,count(*) from Project group by trunc(submission_date,'MM') order by trunc(submission_date,'MM') DESC",nativeQuery = true)
  List<List<String>> findMonthlySubmissions();
}
{'fraction_non_alphanumeric': 0.11587771203155818, 'fraction_numerical': 0.0019723865877712033, 'mean_word_length': 6.351449275362318, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '4643718', 'n_tokens_mistral': 606, 'n_tokens_neox': 589, 'n_words': 138}