From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mO4XDL4DMmDkUgAA0tVLHw (envelope-from ) for ; Sun, 21 Feb 2021 06:54:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sAfDB74DMmAlPgAAbx9fmQ (envelope-from ) for ; Sun, 21 Feb 2021 06:54:54 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7475F2682D for ; Sun, 21 Feb 2021 07:54:53 +0100 (CET) Received: from localhost ([::1]:55542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDidn-0006dM-ES for larch@yhetil.org; Sun, 21 Feb 2021 01:54:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDid6-0006dD-EB for emacs-orgmode@gnu.org; Sun, 21 Feb 2021 01:54:08 -0500 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:40872) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lDid4-0008LQ-Q8 for emacs-orgmode@gnu.org; Sun, 21 Feb 2021 01:54:08 -0500 Received: by mail-pj1-x102e.google.com with SMTP id z9so6712015pjl.5 for ; Sat, 20 Feb 2021 22:54:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version; bh=UPdKVoFX/BGT2GqD8Pl1vtpnSulPI2Y7/VPtNKbAoAM=; b=l/VXMBatXyjYWtMkDhbzBjI88u45hrezTLcHBHe/GOru8YoWnVahTMU600BpmyjCM/ JgZi3MKuo8LSTzSV2u6b04QXn5e8QqLqMmuRx1E30qDarBffZm5HUZGc6B+O0F7i5SqO +xa4w6hX3zykwIip2EiNYiWuQp3TppVSSuskI8z5Cdl+loOtimoTsyOjy7Ecz+pm0/sg UeG1ZMAosiRg7CxDt+vnBeIzyTOezTdwGAdzxpXnL/ricu/KBq7Nd6uJg7IIOqQ8iNBY sNIp1cFtVluAu7CIXdrLEh0YrxIEtIulVigD47yGntmpS2Ce4EP0ANIs5CijDEaOQgNz vZRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version; bh=UPdKVoFX/BGT2GqD8Pl1vtpnSulPI2Y7/VPtNKbAoAM=; b=GRPfjBzKg4kvjxbqHjNmn02zM5oT4y6N3Kywpv/Uf2VryPdVKNkHd5jICBWEwrdGZg nSdJr5qv4nbX0uVYIuSveNKRWBeupDpEaD69sY2NrLmEeFrF1yg0eY4iFaXFAyDRL0Qp coj71amUMtoWAOmF29qa8F2mKSCXCsXmkp278NECVCo8RBMlhkUsxbI5adRbwlCFVwo7 EVJ8hUWD37DEZ7qwPgSiE1leySiNWzWeGDJCwHxU5Ke1FhGiZ7TP3n+6JJ0vN8v8+pEh B6VBC9pyutuhOMXNhSVy33vtklJL80z50mtQakYGfb75u493t4mT5cY6aUM4v/S4B8bs uJkA== X-Gm-Message-State: AOAM532rjywoeni1EOghHuyaZpbiv7ovBs4Fy5Zbzrfk7gnGKIdsTaVx DKpJfIRA+PnuqRKaF7nqiuOk6qZol40= X-Google-Smtp-Source: ABdhPJziPZCoZCeHb2aZyEvinl0Xq7hp1NEbyG5po9J4sBQ25YHi/1UOP963tpLc01rCQAJdnUcENw== X-Received: by 2002:a17:90a:5302:: with SMTP id x2mr17804068pjh.232.1613890443222; Sat, 20 Feb 2021 22:54:03 -0800 (PST) Received: from tim-desktop (106-69-76-250.dyn.iinet.net.au. [106.69.76.250]) by smtp.gmail.com with ESMTPSA id 203sm8284766pfy.105.2021.02.20.22.54.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Feb 2021 22:54:02 -0800 (PST) References: <529055.1613882450@apollo2.minshall.org> User-agent: mu4e 1.5.8; emacs 27.1.91 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: state of the art in org-mode tables e.g. join, etc Date: Sun, 21 Feb 2021 17:45:07 +1100 In-reply-to: <529055.1613882450@apollo2.minshall.org> Message-ID: <875z2lgbco.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x102e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.07 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="l/VXMBat"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 7475F2682D X-Spam-Score: -3.07 X-Migadu-Scanner: scn1.migadu.com X-TUID: gaxxZr77ynJb Greg Minshall writes: > John, > >> Is there a state of the art in using org-tables as little databases >> with joins and stuff? > > i have to admit i do all that with an R code source block. (the dplyr > package has the relevant joins, e.g. dplyr::inner_join().) and, in R, > ":colnames yes" as a header argument gives you header lines on results. > (maybe that's ?now? for "all" languages?) > For really complex joins and ad hoc queries, I would do similar or put the data into sqlite. For more simple ones, I just define a table which uses table formulas to extract the values from the other tables - the downside being the tables need to have the same data ordering or the formulas need to be somewhat complex. Provided the tables have the same number of records in the same order, table formulas are usually fairly easy. I did think about writing some elisp functions to use in my table formulas to make things easier, but then decided I was just re-inventing and well defined database solution and figured when I need it, just use sqlite. However, it has been a while since I needed this level of complexity, so perhaps things have moved on and there are better ways now. -- Tim Cross