Write an SQL query to display:
The program id and program name of all the programs that belongs to the "Entertainment" category.
Your output should have column as given below.
Write an SQL query to display:
Build a query to display PatientName, PatientEmail, AdmissionDate, TotalBilling for each patient, include only patients with total billing amount (like above). TotalBilling is the total amount in descending order.
Your output should have 4 columns as given below:
PATIENTNAME PATIENTEMAIL ADMISSIONDATE TOTALBILLING
You can view the database schema by clicking the View Schema tab at the bottom of the query window on the right-hand side of the screen.
Write an SQL query to display:�The instructor's First Name and Last Name for instructors whose employment is full-time and whose last name starts with 'C'. Use Alias "First Name" and "Last Name".
Your output should have 2 columns as given below:�FirstNameLastName
You can view the database schema by clicking the View Schema tab at the bottom of the query window on the right-hand side of the screen.
VIEWERNAME | COUNTOFPROGRAMME |
Write an SQL query to display:
The viewername and the count of programmes (use alias countofprogramme) the viewer watches.
Your output should have 2 columns as given below:
Name | Total_Quantity |
Write an SQL query to display:
The total quantity sold for each product along with its name. Your output should have 2 columns as given below:
Collapse question
Name | Total_Quantity |
Write an SQL query to display.
The programmeid and the number of viewers for each programme.
Your output should have 2 column as given below:
programmeid total_viewers
You can view the database schema by clicking the View Schema tab at the bottom of the query window on the right-hand side of the screen.
like_id | post_id |
Question 1
How to Attempt?
Write an SQL query to display:�The like ID and post ID for the posts liked before "2024-02-20"
Your output should have column as given below.
You can view the database schema by clicking the View Schema tab at the bottom of the query window on the right hand side of the screen.
SELECT like_id, post_id FROM likes WHERE STR_TO_DATE(data, '%Y-%m-%d')
import ja
import
Magical Library
// R
class U
{
pu
In a magical library, each bookshelf is represented by a two-dimensional array A, where each row of the 2D array A[i] represents the series value of a book.
A row is considered magical if the sum of the odd values of the series of a book is even. Cor Your rows. task is to find and return an integer value representing the number of magical
Input Specification:
input1: An integer value representing the number of rows in the 2D array.
input2: An integer value representing the number of columns in the 2D array.
}
13
input3: A 2D integer array where each row represents a series of books.
Output Specification:
Return an integer value representing the number of magical rows.input2:3
input3: (11,2,3), (4.5.6), (7.8.91)
Output: 2
Explanation:
Here, the given 2D array is (11.2.3). (4.5.6) (7.8.9)
to the first row [1, 2, 3], the odd numbers are (1.3) and their sum is 4 which is even. In the second row (4,5, l, the odd numbers are (5) and as there is only one odd element so the aum is which is odd
In the third row [7, 8, 9), the odd numbers are (7, 9) and their sum is 16 which is
even Therefore, there are only 2 magical rows so. 2 is returned as the output.
Example 2:
input1:3
input2:2
input3: (12, 4), (0,0), (11,111)
Output: 1
Explanation:
Here, the given 2D given array ([2, 4), (0.0), (11, 11)).
-Only the last row (11, 11) has odd elements and their sum is 22 which is even. Therefore, there is only 1 magical row so, 1 is returned as the output.
How to Attempt?
You are given an integer array A of size N, where each element represents the light intensity at a certain point. A low-density light segment is defined as a continuous sequence of elements where the light intensity is less than or equal to a given threshold T. Your task is to find and return an integer value representing the count of how many low-density light segments exist in the array.
Input Specification:
ail.ee
input1: An integer value N representing the ramber of points.
input2: An integer array A representing light intensities at each point.
input3: An integer value T representing the threshold value Gm
4118@
Output Specification:
Return an integer value representing the count of how many low-density light segments exist in the array.
staval
Example 1:
Anvask
input1:8
input2: (3,1,4,2,1,7,5,3)
input3:3
Maker
Output: 3�main
Explanation:
Here, there are 8 number of points with light intensities as (3,1,4,2,1,7,5,3) and T as 3.
The low-density light segments where the intensity is less than or equal to 3 are:
Since there are 3 low-density light segments present, 3 is returned as the output.
ail.co
Example 2:
@gm
input1 : 7
input2: (6,5,4,3,2,1,0)
input3:3
118@
Output: 1
staval
Explanation:
Here, there are 7 number of points with light intensities as (6,5,4,3,2,1,0) and T as 3. The low-density light segments where the intensity is less than (6.843.2.1.0) and
madis
Since there is only 1 low-density light segment present, 1 is returned as the output.
Metti Online Assessment © 2021-2031
Need Help? Contact us (Please add c
ali
Give python3 code for this function�#Read only region start
class UserMainCode(object):
@classmethod
def countLowDensitySegments(cls, input1, input2, input3):
input1: int
input2: int[]
input3:
int
Expected return type: int
Read only region end
write code here
pass
How to Attempt?
You are given a string S representing a sequence of alphabet characters. You have to identify all the occurrences of a "Consonant Wrap," where a vowel character is surrounded by two consonant characters on both sides. Your task is to count and return a string value representing how many Consonant Wrap exist in the string.
ع العد
Note: Only lowercase English letters will be used in the encrypted message.
go Input Specification:
input1: A string S containing lowercase characters.
2002
Output Specification:
199.20
Return a string value representing how many consonant wrap exist in the string.
priya
Example 1:
input1: hilgiop
adinip
Output: 1
nand
Explanation:
Here, the string S is "hilgiop". We can find the consonant wraps in the following�Give the code in java
How to Attempt?�Write an SQL query to display:�The first name, last name, and contact information of all passengers who have a boarding pass for a flight ID 5 and having Gluten-free meal preference.
Your output should have three columns as given below:�FirstNameLastNameContact
You can view the database schema by clicking the View Schema tab at the bottom of the query window on the right-hand side of the screen.