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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:56:58+00:00 2026-05-28T00:56:58+00:00

ID object type 1 1 u 2 1 x 3 1 z 4 2

  • 0
ID        object        type
1           1            u            
2           1            x
3           1            z
4           2            z
5           2            t
6           4            x
7           4            u
8           4            t

Asuming i have that set of data , what i want to get is all distinct objects that would match some variable number of types, and order them by the number of types that matched. All in 1 query.

So lets say i want the objects that are of type u,x,t . I want to select them in descendent order from the object that matched all to the one that matched only 1 in 1 query. If any1 can help, im using mysql …

  • 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-28T00:56:59+00:00Added an answer on May 28, 2026 at 12:56 am

    here you go:

    SELECT *, COUNT(ID) AS matches FROM table_name WHERE type IN('u','x','t') GROUP BY object ORDER BY matches DESC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some string representations of Xaml objects, and I want to build the
What's the object type returned by Datepicker? Supposing I have the following: $(#txtbox).datepicker({ onClose:
If you know an object type, and you have the object's handle (hwnd), is
for String and Object type, I can set the default parameter to null to
I want to determine if a generic object type (T) method type parameter is
I have an extjs component in its raw object type, for example: var x
I recognized that calling a method on an Oracle Object Type takes longer when
I have a SOAP service that returns an array of a complex type. The
I have a custom type that I created, which should be persisted in a
I currently have this type of code: private void FillObject(Object MainObject, Foo Arg1, Bar

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.