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 8837169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:39:27+00:00 2026-06-14T09:39:27+00:00

In mysql, select distinct(trim(containerType)) from productIn where containerType <> ” group by containerNo How

  • 0

In mysql,

select distinct(trim(containerType)) from productIn where containerType <> '' group by containerNo

How can I make expression that query using Lambda?

Ex)

List<string> containerTypes = new List<string>();
containerTypes = productInRepository.GroupBy(x=> x.containerNo).Select(?????).ToList();

enter image description here

  • 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-06-14T09:39:28+00:00Added an answer on June 14, 2026 at 9:39 am

    I think groupby field which is not in result select means the same as orderby this field.

    List<string> containerTypes = productInRepository
                    .Where(x => x.containerType != string.Empty)
                    .OrderBy(x => x.containerNo)
                    .Select(x => x.containerType.Trim())
                    .Distinct();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a mysql query like this: $topicreplycount = mysql_query('SELECT COUNT(DISTINCT post_msg_id) FROM phpbb_attachments
I've used this MySQL query to get data: SELECT DISTINCT A.*, B.username FROM posts
How can you write the following in MYSQL? SELECT AVG(col1) FROM table WHERE DISTINCT
QUERY: mysql> SELECT DISTINCT (stories.id), stories.news_type, story_keywords.keyword FROM (`stories`) LEFT JOIN `story_keywords` ON `stories`.`id`
I have the problem, that MSSQL Server 2000 should select some distinct values from
I'm running the following query in MYSQL select distinct straight_join cu.entryid entryid, t0.tokpos starting_position,
I'm trying to do the following in MySQL: SELECT DISTINCT field FROM table WHERE
I have this MySQL query: SELECT DISTINCT hours.project_id , projects.name , sum(hours.spent_hours) AS expr1
Please help me optimize this query: $result = mysql_query(' SELECT DISTINCT caseNumber FROM master_break
I have a MySQL query: SELECT DISTINCT c.id, c.company_name, cd.firstname, cd.surname, cis.description AS industry_sector

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.