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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:29:11+00:00 2026-05-30T20:29:11+00:00

I have an issue similare to multiple agg functions , with the difference that

  • 0

I have an issue similare to multiple agg functions, with the difference that I cover more than one table:

I want to aggregate two-fold over a set of tables (see schema at the bottom):

Current wrong result:
(The second column actually counts the items of the third column.)

АВТОМАТИЗИРОВАТЬ 2 HD,agt
АВТОМАТИЗИРОВАТЬ 2 HD,coordin
АВТОМАТИЗИРОВАТЬ 2 HD,coordin
АВТОМАТИЗИРОВАТЬ 5 circum,predic,HD,1-compl,--
АВТОМАТИЗИРОВАТЬ 2 predic,HD
АВТОМАТИЗИРОВАТЬ 3 predic,circum,HD

Desired result:

АВТОМАТИЗИРОВАТЬ 1 HD,agt
АВТОМАТИЗИРОВАТЬ 2 HD,coordin
АВТОМАТИЗИРОВАТЬ 1 circum,predic,HD,1-compl,--
АВТОМАТИЗИРОВАТЬ 1 predic,HD
АВТОМАТИЗИРОВАТЬ 1 predic,circum,HD

The first column is the verb.
The third column should specify the usage of the verb in the first column.
The second column should count how many times this specific usage occurs.

select vp.verb, count(), group_concat(label.name) relation 
from vp, label, vp_terminal, terminal 
where label.idlabel==terminal.label_id 
and vp_terminal.vp_id==vp.idvp
and vp_terminal.terminal_id==terminal.idterminal
group by vp.verb, vp.idvp 
order by verb, relation

Database Schema:
Database Schema
One verb (phrase) contains multiple sets of terminals (= words).
The actual words don’t appear in this result, only their grammatical relation to the verb (HD, agt, coordin, predic …).
A set of relations defines one usage of the verb phrase and is indicated by one row, with the frequency counted (yet wrongly).

Output of the current query (wrong):
Current output of other rows

  • 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-30T20:29:12+00:00Added an answer on May 30, 2026 at 8:29 pm

    I found the answer finally:

    select verb, count(relation) count, relation
    from
        (select vp.verb, group_concat(label.name) relation 
        from 
            vp, label, vp_terminal, terminal 
        where 
            label.idlabel==terminal.label_id 
            and vp_terminal.vp_id==vp.idvp
            and vp_terminal.terminal_id==terminal.idterminal
        group by vp.verb, vp.idvp 
        order by verb, relation)
    group by relation, verb 
    order by verb asc, count desc;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to clone multiple tables' rows that have a single primary key (PrimKey).
my issue lokks similar to this one: (link) but i have one-to-many association: <set
I have issue that is reproduced on g++. VC++ doesn't meet any problems. So
I have an issue that is driving me a bit nuts: Using a UserProfileManager
I need to have a command handler for a ToggleButton that can take multiple
I have a database that has two tables, one of which contains a foreign
I am looking to merge multiple xslt stylesheets (V1.0) into one stylesheet. I have
I have a RESTful web application that supports multiple sort fields on a collection
I have something similar to below: <div style=float:left;margin-left:5px;>Test</div> The issue is that I need
I have a question about duplicate content issue. I have pages with article, one

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.