AutomationFlowsGeneral › Compare MySQL Datasets Over Years

Compare MySQL Datasets Over Years

Original n8n title: Compare Sql Datasets

Compare Sql Datasets. Uses manualTrigger, compareDatasets, mySql. Event-driven trigger; 5 nodes.

Event trigger★★☆☆☆ complexity5 nodesMySQL
General Trigger: Event Nodes: 5 Complexity: ★★☆☆☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "id": "df04c503-d4af-4e8f-bcc3-f1fd02d3a332",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        780,
        340
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6fe78ae6-7325-4062-ab58-457dc1d985c4",
      "name": "Compare Datasets",
      "type": "n8n-nodes-base.compareDatasets",
      "position": [
        1560,
        320
      ],
      "parameters": {
        "options": {
          "multipleMatches": "all"
        },
        "mergeByFields": {
          "values": [
            {
              "field1": "customerNumber",
              "field2": "customerNumber"
            },
            {
              "field1": "year",
              "field2": "year"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "0dae008c-242d-4757-a5a4-a075bde54cb6",
      "name": "Orders from 2003 and 2004",
      "type": "n8n-nodes-base.mySql",
      "position": [
        1080,
        220
      ],
      "parameters": {
        "query": "SELECT customerNumber, SUM(amount) as Total, COUNT(*) as ordercount, YEAR(paymentDate) as year\nFROM payments\nWHERE YEAR(paymentDate) = '2003' OR YEAR(paymentDate) = '2004'\nGROUP BY customerNumber, year\n;",
        "options": {},
        "operation": "executeQuery"
      },
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "c162e9b5-6e26-4a81-b90d-a5709e73019c",
      "name": "Orders from 2004 and 2005",
      "type": "n8n-nodes-base.mySql",
      "position": [
        1080,
        440
      ],
      "parameters": {
        "query": "SELECT customerNumber, SUM(amount) as Total, COUNT(*) as ordercount, YEAR(paymentDate) as year\nFROM payments\nWHERE YEAR(paymentDate) = '2004' OR YEAR(paymentDate) = '2005'\nGROUP BY customerNumber, year\n;",
        "options": {},
        "operation": "executeQuery"
      },
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "05547a67-2c53-43df-8abd-ee356f12742b",
      "name": "Change ordercount",
      "type": "n8n-nodes-base.set",
      "position": [
        1300,
        440
      ],
      "parameters": {
        "values": {
          "number": [
            {
              "name": "ordercount",
              "value": 1
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 2
    }
  ],
  "connections": {
    "Change ordercount": {
      "main": [
        [
          {
            "node": "Compare Datasets",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Orders from 2003 and 2004": {
      "main": [
        [
          {
            "node": "Compare Datasets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Orders from 2004 and 2005": {
      "main": [
        [
          {
            "node": "Change ordercount",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "Orders from 2003 and 2004",
            "type": "main",
            "index": 0
          },
          {
            "node": "Orders from 2004 and 2005",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Compare Sql Datasets. Uses manualTrigger, compareDatasets, mySql. Event-driven trigger; 5 nodes.

Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

Compare 2 SQL datasets. Uses manualTrigger, compareDatasets, mySql. Event-driven trigger; 5 nodes.

MySQL
General

Create 2 Xml Files With And Without Xml Attributes. Uses manualTrigger, mySql, itemLists, xml. Event-driven trigger; 13 nodes.

MySQL, Item Lists, XML +2
General

Http-Handle. Uses httpRequest. Event-driven trigger; 13 nodes.

HTTP Request
General

Absen Otomatis. Uses ssh, executeWorkflowTrigger, scheduleTrigger, httpRequest. Event-driven trigger; 12 nodes.

Ssh, Execute Workflow Trigger, HTTP Request
General

Automate document translation and ensure translation accuracy using Straker Verify, Google Drive and Slack.

N8N Nodes Straker Verify, Google Drive, Google Drive Trigger