Jump to content

Search the Community

Showing results for tags 'inner joins'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 2 results

  1. Tauheed

    MySQL query help

    I don't have MySQL experience, I need some help to write a query for my work. I need a query that count transaction for a week, for example, I wanna run the query every Friday and want to see the result from last Friday to Thursday, I mean just last week's data. The start date is last Friday (11/12/2021) and the End date is Thursday (11/18/2021). It is a weekly process that I can run every week to download the output. There are two tables, sales, and customers. The customer table has fields such as "customer_id", FirstName, LastName, etc and the sales table has "id" which is the same as customer_id from customer table, salesDate, etc. I want to count data of those who are customer_id match to the sales table. I would like to ignore some of the users as well like our IT team has a couple of test users that uses for testing. for example testuser1 and testuser2. I would like the query to not count these two users. Here is an example that I want to make work. Can someone please help me to write the query? SELECT COUNT(CustomerID) AS NumberOfCustomer FROM Customer INNER JOIN Sales ON ID = CustomerID where user != (testuser1 and testuser2 where sales date between last Friday to Thursday; Thanks!
  2. imelendez

    Inner Joins

    Hello All - I am new to SQL joins and I am having a difficulty grabbing data from another table. The table I am primarily running select statements on to output the information I need is HRO. I am wanting to grab some data from the StoreInfo table, but, I cannot seem to get the INNER JOIN function to work. I get this "the multiplier identifier could not be bound." What am I doing wrong? Please see the code below. use ROWDW; select store_UIN.HRO, store_UIN.StoreInfo FORMAT(SUM(total-tax), 'C', 'en-us') AS 'Sales ending 02/06/2016', COUNT(RO_NO) as 'Car Count', FORMAT(((SUM((total-tax-t_cost)-(p_cost-supplies))/SUM(total-tax-supplies))), 'P', 'en-us' ) as GPM from HRO inner join StoreInfo on store_UIN.HRO = store_UIN.StoreInfo where ( PAY_DATE >= '01/31/2016') And (PAY_DATE <= '02/06/2016') and [Status] = 'C' group by store_UIN Thanks in advance for your help.
×
×
  • Create New...