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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:29:59+00:00 2026-05-23T17:29:59+00:00

I’m trying to make a crosstab query (with access tables), But I got lost

  • 0

I’m trying to make a crosstab query (with access tables), But I got lost writing the inner joins statements.
My end result suppose to be the “QueryResult”.

Table1 holds the fund information,
Table2 are the type of data the funds have
Table3 is a conversion from the codes of the data to the type data in table2, and Table4 holds the data.

Table1

FundID FundName
1      Fund1
2      Fund2
3      Fund3
4      Fund4
5      Fund5
6      Fund6
7      Fund7

Table2

TypeID TypeName
1      Balance
2      Yield
3      Fees
4      Deposits
5      Withdraws

Table3

CodeID TypeID    
KT111   1
KT112   2
KT113   3
KT115   3
KT116   4
KT117   4
KT118   5
KT119   5

Table 4

CodeID FundID DataVal
KT111  1      1000
KT116  2      40
KT118  3      30
KT119  3      30
KT118  2      10
KT119  2      50
KT111  2      3000
KT111  3      2000
KT112  1      1.5
KT112  2      1.0
KT112  3      0.5

P.S: Table4 holds much rows then shown here with codes which I do not need.

QueryResult

FundID  Balance Yield Fees Deposits Withdraws
1        1,000   1.5   555   40     60
2        3,000   1.0   155   20     60
3        2,000   0.5   255   70     60

What is the right statement to get the query result? (I got lost on the inner joins…)
Is there also a way to sum some of the data, and show the value (without summing) of other data from table4?

Thanks!

  • 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-23T17:30:00+00:00Added an answer on May 23, 2026 at 5:30 pm

    while I am not exactly sure of all of the requirements you have, this might get you started:

    TRANSFORM Sum(d.dataval) as DataValue
    SELECT d.fundid
    FROM 
    ((Data d
    INNER JOIN fund f ON d.fundid = f.fundid)
    INNER JOIN  code c ON d.codeid = c.codeid)
    INNER JOIN type t on c.typeid = t.typeid
    GROUP BY d.fundid
    PIVOT T.Typename
    

    Results:

    fundid  Balance Deposits    Withdraws   Yield
    1       1000                            1.5
    2       3000    40      60      1
    3       2000            60      0.5
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.