<commit_before>const knex = require('../../../knex').web

module.exports = function () {
  return knex('reduction_reason')
    .join('reduction_category', 'reduction_reason.category_id', 'reduction_category.id')
    .select('reduction_reason.id',
            'category',
            'reason',
            'reason_short_name AS reasonShortName',
            'allowance_percentage AS allowancePercentage',
            'max_allowance_percentage AS maxAllowancePercentage',
            'months_to_expiry AS monthsToExpiry'
           )
}<commit_msg>Sort reduction reasons data services by reason short name<commit_after>const knex = require('../../../knex').web

module.exports = function () {
  return knex('reduction_reason')
    .join('reduction_category', 'reduction_reason.category_id', 'reduction_category.id')
    .select('reduction_reason.id',
            'category',
            'reason',
            'reason_short_name AS reasonShortName',
            'allowance_percentage AS allowancePercentage',
            'max_allowance_percentage AS maxAllowancePercentage',
            'months_to_expiry AS monthsToExpiry')
    .orderBy('reason_short_name')
}
{'fraction_non_alphanumeric': 0.11678200692041522, 'fraction_numerical': 0.0, 'mean_word_length': 3.088339222614841, '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': '5551985', 'n_tokens_mistral': 332, 'n_tokens_neox': 316, 'n_words': 59}