Posts Subscribe to (PIA BATTA)Comments

Query View untuk Group dan Crosstab Data


Sebenarnya query ini tidak sering kita butuhkan. Ya tergantug kebutuhan. Semua itu balik lagi ke ide-ide kita.

Silahkan baca, perhatikan dan pelajari query dibawah ini. Semoga memberikan inspirasi bagi anda.


SELECT a1.name,
a1.sex,
a2.name,
a2.sex,
a1.species
FROM domestic_animal AS a1
INNER JOIN domestic_animal AS a2
ON a1.species = a2.species
AND a1.sex = 'f'
AND a2.sex = 'm';

--PRODUCES--:

+--------+------+--------+------+---------+
| name | sex | name | sex | species |
+--------+------+--------+------+---------+
| Bertha | f | Bucko | m | cow |
| Buffy | f | Killer | m | dog |
| Babe | f | Bowser | m | pig |
+--------+------+--------+------+---------+


Sumber dari sini...




Semoga bermanfaat....

Categories



Widget by Scrapur

0 komentar:

:)) :)] ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} ~x( :-t b-( :-L x( =))

Posting Komentar

 
Dark Side Blogger Template Copyright 2009 - piaBATTA is proudly powered by Blogger.com Edited By Belajar SEO