Results 1 to 2 of 2
  1. #1
    zajkowsky is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    1

    query with 2 tables problem

    Hello!
    I'm beginner of sql and access and i need help. Probably this problem is easy , so :
    I have 2 tables : In first are information like salary,birthday. In second.... this photo shows situation :



    Destination of my task is show name and surname of person who have minimum wage. Now, this program shows only a minimum wage , but i dont know , what i have to write to this code to show only name and surname of person who have minimum wage.Here you are SQL code which can show more !
    [sql]SELECT Min(Dane_osobowe.pensja) AS MinimumOfpensja
    FROM Dane_osobowe INNER JOIN Pracownicy ON Dane_osobowe.kod_prac = Pracownicy.kod_prac;
    [/sql]


    sory for language here is translation of table's name's :
    kod_prac = employee's ID
    pesel (is not important)
    data_ur - birthday


    pensja = salary
    nazisko = surname
    imie = name
    rest is not important!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,953
    Your image did not attach to post.

    Min is an aggregate function. Must be used in a Totals query. Access Help has guidance on building Totals (aggregate) query (uses a GROUP BY clause).
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. A problem with a query with related tables
    By Evdokimos in forum Queries
    Replies: 3
    Last Post: 10-26-2012, 04:16 AM
  2. Noob problem: query and multiple tables
    By PaulCW in forum Queries
    Replies: 6
    Last Post: 09-23-2011, 12:46 PM
  3. Have 3 tables - problem with pulling data for query
    By wulfhund in forum Database Design
    Replies: 2
    Last Post: 08-13-2010, 05:38 AM
  4. Query problem with multiple tables
    By DanW in forum Queries
    Replies: 1
    Last Post: 11-20-2009, 06:23 PM
  5. Tables and “all data query” ID problem
    By mashe in forum Queries
    Replies: 5
    Last Post: 08-22-2009, 06:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums