Question: Hello, I am completing a mysql question using these parameters: feature: This is a 'normalized' schema, and all biological feature types are stored in this

Hello,

I am completing a mysql question using these parameters:

feature: This is a 'normalized' schema, and all biological feature types are stored in this same table. The type_id column distinguishes them by giving each a different numerical type.

cvterm: Each of the numerical types from the feature table are given more user-friendly text-based names in this table. The cvterm_id field of this table can be directly linked to the type_id of the feature table.

Write an SQL query which lists the types of features in the feature table along with a count of each. Your output should look like this (using column aliases to match mine):

I would like some help troubleshooting my command. I keep recieving a NULL table, which I have also attached.

My current code that I need troubleshooted is the following:

Select feature.name as "feature type" , count(cvterm.cvterm_id) as "feature count" from feature inner join cvterm on feature.type_id = cvterm.cvterm_id group by feature.name;

The top image is what the finished table should look like. The bottom two are tables already created for me. I have attached to show variables that I use for this project. The very bottom image is the NULL table that I am currently recieving back.

Hello, I am completing a mysql question using these parameters: feature: This

is a 'normalized' schema, and all biological feature types are stored in

Table should Look like: feature type | feature count | assembly exon gene mRNA 4200 | 4200 4200 | 4200 | polypeptide [ DESCRIBE cvterm; mysql> DESCRIBE cvterm I Field l Type | Null | Key DefaultI Extra | | cvterm_id I int (11) I int (11) | varchar (255) NO MUL NULL I I NO I PRI | NULL NO I MUL I NULLI I name varchar(120) | YES NULL I YES MUL I NULL I NULL NULL I definition I dbxref id | is obsolete I is_relationshiptype | tinyint1) | int (11.) NO NO 7 rows in set (0.00 sec) DESCRIBE feature; ysql> DESORIBE feature l Field l Type I Null I Key Default l Extra int(11)NO PRI NUL I feature id I dbxref id I organisn id int(11) YES MUL NULL t(11) IND IHUL NULL I varchar25) YESNULL l uniquenane I residues I longtext YESNULL (1)IYESNULL 1md5checksun | char(32) IYES I NULL l type id Iis analysistinyinta) N INULL I is obsolete tinyint(1) INO I I int(11) NO IPRI 1NULL I tineaccessionedtinestarp NOCURRENT TIMESTAMP on update CURRENT T STAMP I Itinelastnodified tinestarp IND I8e88-88-88 88:88:8 13 rows in set 8.80 sec) Table should Look like: feature type | feature count | assembly exon gene mRNA 4200 | 4200 4200 | 4200 | polypeptide [ DESCRIBE cvterm; mysql> DESCRIBE cvterm I Field l Type | Null | Key DefaultI Extra | | cvterm_id I int (11) I int (11) | varchar (255) NO MUL NULL I I NO I PRI | NULL NO I MUL I NULLI I name varchar(120) | YES NULL I YES MUL I NULL I NULL NULL I definition I dbxref id | is obsolete I is_relationshiptype | tinyint1) | int (11.) NO NO 7 rows in set (0.00 sec) DESCRIBE feature; ysql> DESORIBE feature l Field l Type I Null I Key Default l Extra int(11)NO PRI NUL I feature id I dbxref id I organisn id int(11) YES MUL NULL t(11) IND IHUL NULL I varchar25) YESNULL l uniquenane I residues I longtext YESNULL (1)IYESNULL 1md5checksun | char(32) IYES I NULL l type id Iis analysistinyinta) N INULL I is obsolete tinyint(1) INO I I int(11) NO IPRI 1NULL I tineaccessionedtinestarp NOCURRENT TIMESTAMP on update CURRENT T STAMP I Itinelastnodified tinestarp IND I8e88-88-88 88:88:8 13 rows in set 8.80 sec)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!