Access 数据库中 sum distinct 等函数的运用

  1. SELECT SUM([count]) AS total, pro_type
    FROM goodsIn
    WHERE (pro_type IN ('LM1117-5V', 'AD8532A', 'LM32445412', '74HC595D', 'IMP706PESA', 
        'HT7150', '74HC573DADFAEWR23', 'LM2576-5V', 'D71-54L-10', 'HEF4016', 'PC817', 
        'LMC6572', 'MAX1487E', 'DB107', 'AT24C02B', 'ULN2803AG', 'LM2575-15V', 
        '74HC244', 'MAX3232ESE', 'CD4093BM', '74HC126', 'MMAX232E', 'PC82C250', 
        'AP3012', 'MAX485186646', 'AD7705BR', 'PS767D318', 'TL431AC Tivfff', 'LM324', 
        'MAX485', 'LPC2148', 'LM385-1.2V', 'LM336-2.5V', '79L12', 'TOP223YN', 
        'SM8958AC25', 'TLC2543CN', 'LM393P', 'LM293P', 'TLC5615IP', 'LM258P', 
        'AT89C2051-24PU', 'DS75176BN', 'DS1225Y', '蜂鸣器', '24.576m', '20', 
        'TCA0372DWXYZ', 'W78LE365', 'P89V51RD2FBC', 'ICL7135', 'LM324N', 'IRF530N', 
        'ULN2803  ST', 'XTR105P', 'KBL608', 'HD74HC14P', 'MAX202EEPE', 'LM358N', 
        'NEC2501', 'MAX232EEPE', '74HC04', '7407N', '74LS164', '74HC139', 'TCA0372DW', 
        'PC817D', 'AT93C66', 'MC79L05ACO', 'ATMEGA16PP-16Au', 'LM2575-5v45841', 
        'LM2575-12v658', 'TLP521-16745', 'HEF40106VVV', 'CD4069', '6N137asldkjfalf', 
        'AT89S52-24PU', 'AT89C4051-24PUccc', 'AT89C4051-24PU', 'ATMEGA48v-10pu', 
        'KBL608viiuyhadf', 'W08G', 'AT93C66SI2.7'))
    GROUP BY pro_type
  2. select distinct(列名) from 表名
posted @ 2012-02-13 14:53  帕丁顿熊  阅读(1708)  评论(0编辑  收藏  举报