Soham

 [30/12, 10:34 pm] Soham BCA: DOCTYPE HTML> 

<html>

<head>

<meta charset ="UTF-8">

<meta name ="viewport" content=" width=device-width, initial-scale=1.0">

<title> Department of MCA </title>

</head>

<body>

<h1> VSM'S Institute of Technology </h1> 

<hr> </hr>

<h2> <em> MCA department</em></h2>

<h3><small> <samp> Faculty details </samp> </small> </h3>

<table border="1">

<tr>

     <th>  Name </th>

     <th> designation </th>


</tr>

    <tr>

        <td> gayatri </td>

        <td>HOD </td>

</tr>

    <tr> 

     <td> shraddha </td>

      <td> professor</td>

</tr>

</table>

  <h3><strong>  useful links </strong> </h3>

  <a href="https://www.vsmsrkit.edu.in/"><b>VSM'S</b></a>

<br> </br>


<img src="image.jpg" width="500" height="300">

<br> </br>

</body>

</html>

[30/12, 10:37 pm] Soham BCA: <!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Lab 2</title>

</head>


<body>

    <h1>Find first n Fibonacci numbers</h1>

    <button onclick="fib()">Generate</button>


    <h1>Generate numbers and their squares</h1>

    <button onclick="square()">Generate</button>


    <script>

        function fib() {

            let n = parseInt(prompt("Enter value for n:"));

            let a = 0, b = 1;

            let output = "Fibonacci series:\n";


            for (let i = 0; i < n; i++) {

                if (i === 0) {

                    output += "0 ";

                } else if (i === 1) {

                    output += "1 ";

                } else {

                    let c = a + b;

                    output += c + " ";

                    a = b;

                    b = c;

                }

            }

            alert(output);

        }


        function square() {

            let n = parseInt(prompt("Enter value for n:"));

            let output = "Number   Square\n";


            for (let i = 1; i <= n; i++) {

                let sq = i * i;

                output += i + "        " + sq + "\n";

            }

            alert(output);

        }

    </script>

</body>

</html>

[30/12, 10:38 pm] Soham BCA: DOCTYPEN HTML>

<HTML>

<head>

<meta charset="UTF-8">

<meta name="viewport " content="width=device-width,initial-scale =1.0">

<title> lab 2</title>

</head>

<body>

<h1> find first n fibonacci  numbers</h1>

<button onclick="fib()"> generate </button>

<h1>generate numbers and its squares </h1>

<button onclick="square()">generate</button>


</body>

<script>

Function fib ()  { 

Let n = parseInt  ( prompt( “ enter  value for n :”));

Let a= 0 ,b =1, c=0 ; 

Let output= ‘ Fibonacci series\ n “;

For (i=0; i<n ; ++ i) 

If (i ==0 || i ==1) {

Output +=i +” “ ;

Continue ;

}

Let c=a+b ;

Output +=c+”  “ ;

A=b;

b=c;

}

alert( output ) ; 

}

function square ( ) {

let n=parseInt  ( prompt (“ enter value for n :”)) ;

let output= “Number squares \ n” ;

for (i = 1 ; i<=n ; ++i)

 {

Let square = i*i ;

Output += i  +”  “+square + “\n” ;

}

Alert (output) ;

}

<\script> 

<\html>





 1. List the details of Students who are all studying in 2nd sem MCA


SELECT FROM STUDENT


WHERE SEM 2 AND BRANCHID IN (


SELECT BRANCHID


FROM BRANCH


WHERE BRANCHNAME='MCA'



 ii. List the students who are not borrowed any books


SELECT FROM STUDENT


WHERE USN NOT IN( SELECT USN FROM BORROW



iii. Display the USN, Student name, Branch_name, Book_name, Author_name, Books Borrowed Date of 2nd sem MCA Students who borrowed books


SELECT S.USN,S.NAME, BRANCHNAME, BOOKNAME, AUTHORNAME, BORROW DATE FROM STUDENT S, BOOK, BORROW B, AUTHOR, BRANCH WHERE S.USN-B.USN AND S.BRANCHID BRANCH.BRANCHID AND BOOK.AUTHORID -AUTHOR AUTHORID AND BOOK.BOOKID B.BOOKID AND SEM-2 AND BRANCH 'MCA':




iv. Display the number of books written by each Author.


SELECT AUTHORNAME, COUNT(*) FROM BOOK B, AUTHOR A


WHERE B.AUTHORIDA.AUTHORID


GROUP BY AUTHORNAME






v. Display the student details who borrowed more than two books.


SELECT FROM STUDENT


WHERE USN IN SELECT USN FROM BORROW GROUP BY USN HAVING COUNT(USN)>2);





vi. Display the student details who borrowed books of more than one Author.


SELECT


FROM STUDENT WHERE USN IN


SELECT USN


HUM BORHOW, BKIK


WHERE BORROW.BOOKID BOOK BOOKID


GROUP BY USN HAVING COUNT DISTINCT AUTHORID)>1

[30/12, 11:21 pm] Soham BCA: vil.Display the Book names in descending order of their names.


SELECT BOOKNAME FROM BOOK


ORDER BY BOOKNAME DESG







vil. List the details of students who borrowed the books which are all published by the same publisher.


SELECT


FROM STUDENT WHERE USN IN


SELECT USN FROM BORROW B, BOOK BK


WHERE EELBOOKID BR.BUUKILL


GROUP BY USN HAVING COUNT DISTINCT PUBLISHER) 1







1 Display the youngest player (in terms of age) Name, Team name, age in which he belongs of the tournament.


SELECT PNAME, TNAME, AGE


FROM PLAYER P, TEAM I


WHERE P.TEAMIDT.TEAMID AND AGE (SELECT MIN(AGE) FROM PLAYER);









2 List the details of the stadium where the maximum number of matches were played.


SELECT


FROM STADIUM


WHERE SID IN (


SELECT MSTADIUM


FROM MATCH


GROUP BY MSTADIUM


HAVING COUNT(MSTADIUM)-(


SELECT MAX(COUNTS) FROM (


SELECT COUNT(*) COUNTS


FROM MAICH


GROUP BY MSTADIUM) COUNTER));







3 List the details of the player who is not a captain but got the man_of_match award at least in two matches.


SELECT


FROM PLAYER


WHERE PID IN (


SELECT MOTMAICH


FROM MAICH


GROUP BY MOTMATCH


HAVING COUNT(MOIMAICH)>-2)AND PID NOT IN (SELECT CID FROM TEAM);










4 Display the Team details who won the maximum matches.


SELECT


FROM TEAM


WHERE TEAMID IN (


SELECT WINNERID


FROM MAICH


GROUP BY WINNERID


HAVING COUNT(WINNERID)-(


SELECT MAX(COUNTS) FROM(


SELECT COUNT(*) COUNTS


FROM MATCH


GROUP BY WINNERID) COUNTER));

[30/12, 11:32 pm] Soham BCA: 5 Display the team name where all its won matches played in the same stadium.


SELECT TNAME


FROM TEAM, MATCH


WHERE TEAMID-WINNERID


GROUP BY INAME


HAVING COUNT(DISTINCT MSTADIUM)-1;

Comments

Popular posts from this blog

Abhijit_python

Php

Abhijit HTML