Association-rule mining finds "customers who bought A also bought B" patterns in basket data, scoring each rule by support, confidence and lift.
The Apriori algorithm (Agrawal & Srikant, 1994) searches for itemsets that appear together often enough to matter, then turns each into rules. It is made tractable by downward closure: every subset of a frequent itemset is itself frequent, so candidates of size k are built only from frequent sets of size k-1 and anything with an infrequent subset is discarded before its support is ever counted.
Three numbers describe a rule and they answer different questions. Support is how often the whole combination occurs — a rule with tiny support may be real but is rarely worth acting on. Confidence is how often the consequent follows the antecedent. Lift compares that confidence to the consequent's own base rate: lift near 1 means the rule is telling you nothing except that the item is popular.
Either one row per basket with a column per item (any non-blank, non-zero value counts as present), or one row per basket-item pair with a basket id and an item column.
Each rule with its support, confidence, lift and transaction count, sorted by lift, plus the most frequent individual items.