Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3222210
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:57:53+00:00 2026-05-17T15:57:53+00:00

Ok, have the following code: SELECT q21 as Comment, q21coding AS Description FROM `tresults_acme`

  • 0

Ok, have the following code:

SELECT q21 as Comment, q21coding  AS Description 
FROM `tresults_acme` 
WHERE q21 IS NOT NULL AND q21 <> '' 
ORDER BY q21coding = 'Other', q21coding = 'Positive comments', Count ASC

This brings back the following (excerpt):

Text                                                     Description
Lack of up to date equal pay cases&legislation - t...   Content needs updating
The intranet could contain more "up to date traini...   Content needs updating
Poorly set out. It is hard to find things.             Difficulty in navigating/finding content
Only use the intranet as a necessity. Will ask my ...   Difficulty in navigating/finding content
Never really use it too difficult to be honest, s ...   Difficulty in navigating/finding content

What I need to do is bring back the Text in a specific order basically this is where a COUNT for Description is in Ascending order – make sense?

So in the example above, the text for ‘Difficulty in navigating/ finding conent’ would come first as it has a count of 3, then ‘Content needs updating’ as it has a count of 2.

Any advice welcome!

Thanks as always,

Homer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:57:54+00:00Added an answer on May 17, 2026 at 3:57 pm

    Not entirely sure if this would work (cannot test this right now):

    SELECT q21 as Comment, q21coding  AS Description, (SELECT COUNT(*) FROM `tresults_acme` as t_a WHERE t_a.q21coding = Description) AS Count 
    FROM `tresults_acme` 
    WHERE q21 IS NOT NULL AND q21 <> '' 
    ORDER BY q21coding = 'Other', q21coding = 'Positive comments', Count ASC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following code: SELECT q21, q21coding AS Description FROM `tresults_acme` WHERE q21 IS
I have the following code: SELECT q21coding, COUNT(q21coding) AS Count FROM `tresults_acme` WHERE q21
I have following code.. $query = SELECT quote, author FROM quotes ORDER BY id
All, I have the following code: $qry = Select * from vendor_options order by
I have the following code: $catsQuery = SELECT id, category FROM categories ORDER BY
I Have following code with LINQ var q = (from web in DataContext.Webs select
I have the following code: function isValidAuthor($authorID){ $query = SELECT * FROM jos_users WHERE
I have the following code $result = $handle->select()->from('store_details') ->where('store_details.store_id=?', $id) ->columns('store_details.store_name'); //->query(ZEND_DB::FETCH_OBJ); However, when
I have the following code: $sql = SELECT name, address, city FROM tableA, tableB
Let's say that I have the following code: SELECT * FROM table where company

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.